# How can I draw a map and write on it? [duplicate]

I need to have a real map like the one attached, and I do some writing on it ?? Any suggestions please

• Is the map a simple image that already exists?
– Tom
Jan 27, 2019 at 16:50
• @Tom: Most likely it is a screen shot of some map application, e.g. some .png or .jpg file.
– user31729
Jan 27, 2019 at 17:16
• If the map is an already existing file of .jpg, .pdf or .png format, use TikZ to overprint it with math content. If it is not existing, use Tikz as well ;-)
– user31729
Jan 27, 2019 at 17:20
• Yeah. I got it from academic paper Jan 27, 2019 at 18:01
– Tom
Jan 27, 2019 at 22:24

I will assume that you have the map as a picture (.jpg, .png, ...).

I am using the example image from the graphicx package. To illustrate the use.

You can use TikZ to draw on the image and add lines. I have added two points and a connecting line. The points are arbitrarily named (here p0 and p1). You can add many points and connect them with the a line (just add -- (p3) and so forth to the existing one).

% with ideas from https://stackoverflow.com/a/2628796

\documentclass[tikz]{standalone}
\usepackage{graphicx} % for example images

\begin{document}
\begin{tikzpicture}[every label/.style={fill=white, inner sep=1mm}]

% styles
\tikzstyle{myLabel}=[draw=black, circle, fill=white]
\tikzstyle{myLine}=[draw=blue,  double]

\draw (0,0) node[inner sep=0] {\includegraphics[width=10cm]{example-image-a}};

% nodes
\node[myLabel,label={above:$(l,t)_2^D$}] (p0) at (1,2) {} ;
\node[myLabel,label={right:$(l,t)_3^D$}] (p1) at (3,1) {} ;

% lines
\path[myLine] (p0) -- (p1) ;
\end{tikzpicture}
\end{document}


this example will look like this:

With a picture of a "real" map (and a photo by Lorenzo Cafaro from Pexels) it will look like this: