summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mercatormap/mercatormap-example.tex
blob: 196906fc852d59f1abce93507e008db185239ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
% \LaTeX-Main\
% !TeX encoding=UTF-8
%%
%% The LaTeX package mercatormap - version 1.00 (2020/04/20)
%% mercatormap-example.tex: Example document with a map
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2020 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README
%%
% arara: pdflatex: { shell: yes }
%
\def\mrcpkgprefix{}
\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[bookmarks,raiselinks,pageanchor,colorlinks]{hyperref}
\usepackage[a4paper,margin=15mm,noheadfoot]{geometry}
\usepackage{mercatormap}

\pagestyle{empty}

\mrcactivatescript% activates Python script

\begin{document}

\vspace*{\fill}
\noindent
\begin{tikzpicture}
  \mrcNPdef{bbox-SW}{47.270111}{8.976350}
  \mrcNPdef{bbox-NE}{50.564714}{13.839637}
  \mrcmap
  [
    area = {bbox-SW, bbox-NE},
    area to reference,
    type   = reference,
    flex reference scale = 2000000,
    tex width  = \linewidth,
    tex height = 22cm,
    source     = topplusopen web,
  ]{mercatormap-example}
  \mrcdrawmap
  \mrcdrawnetwork
  \node[below,font=\fontsize{7pt}{7pt}\sffamily] at (mrcmap.south)
    {\mrcmapattribution};
  \mrcclipmap

  \draw[thick] (mrcmap.south west) rectangle (mrcmap.north east);

  \mermapsetmarker{type=drop, draw=red, fill=red!20!white,
    font=\sffamily\bfseries}
  \mrcmarker{position=48.137222:11.575556, contents={M}}
  \mrcmarker{position=48.537222:12.152222, contents={LA}}
  \mrcmarker{position=49.017222:12.096944, contents={R}}
  \mrcmarker{position=48.371667:10.898333, contents={A}}
  \mrcmarker{position=49.300833:10.571667, contents={AN}}
  \mrcmarker{position=49.948056:11.578333, contents={BT}}
  \mrcmarker{position=49.948056:11.578333, contents={BT}}
  \mrcmarker{position=49.794444:9.929444,  contents={W\"U}}

  \node[below left=2mm,align=center,fill=white,draw=black,fill opacity=0.9,
    text opacity=1,inner sep=2mm] at (mrcmap.north east)
  {
    \textbf{\Large Bayern}\\[1mm]
    \mrcprettymapscale\\[1mm]
    \begin{tikzpicture}
    \mrcdrawscalebar[width-in-km=100]
    \path[every node/.style={above,inner sep=0.5mm,font=\sffamily\tiny}]
      (mrcscalebar.north west) -- (mrcscalebar.north east)
      node[pos=0]{0} node[pos=0.2]{20} node[pos=0.4]{40} node[pos=0.6]{60}
      node[pos=0.8]{80} node[pos=1]{100} node[pos=1,right,yshift=-1mm]{km};
    \end{tikzpicture}
  };

\end{tikzpicture}
\vspace*{\fill}

\end{document}