Closed rolfn closed 4 years ago
For the type pin
, there is no distance customization (yet).
But you can create your own marker type as documented. One way is to copy and modify some package code. In the following example, a new marker xpin
is made from pin
with an distance modifier \mydistance
. If \mydistance
is set to 0.5
, you have the original pin
distance.
\def\mydistance{0.25}
\ExplSyntaxOn
\__mermap_new_marker_type:nn {xpin}
{
\path[fill=mrcmarkerfill,draw=none,fill~opacity=0.7]
(0,0) -- (0.1,\mydistance) -- (-0.1,\mydistance) -- cycle;
\node[fill=white,draw=none,text=mrcmarkertext,
above,font=\mrcmarkerfont,inner~sep=0.5mm,align=center,
line~width=0mm,xshift=\mrcmarkershift,
fill~opacity=0.7,text~opacity=1,xshift=0mm,mrcnodestyle]
(pin_node) at (0,\mydistance) {\mrcmarkercontents};
\path[draw=mrcmarkerdraw,fill=none,line~join=round,mrcpathstyle]
(0,0) -- (0.1,\mydistance) -- (pin_node.south~east) -- (pin_node.north~east)
-- (pin_node.north~west) -- (pin_node.south~west)
-- (-0.1,\mydistance) [line~join=bevel] -- cycle;
}
\ExplSyntaxOff
Thanks a lot. This helps.
I incorporated this distance feature to pin
into Version 1.02 (2020-08-06).
Many Thanks.
I created a map similar to the example in the manual:
The result would look better if I could reduce the distance between the pin marker and the city position. How can it work? The following picture shows the problem. Many thanks in advance.