Message Boards Message Boards

[✓] Insert text in maps?

GROUPS:

Friends, I want to insert text in a map. For example, in the following code I would like to put a label of the two towns I am highlighting in the map. I have not been able to do it: not by labeled nor by any other method. Actually, I would like to use Inset or Text, to have full control of the text style. Can somebody help me? Attached, the example-code. Thanks

Attachments:
POSTED BY: Francisco Gutierrez
Answer
26 days ago

Text works fine, for example Text["Ariguani", GeoPosition[{9.85, -74.24}]]

POSTED BY: Gianluca Gorni
Answer
26 days ago

Simple and clear. Thanks!

POSTED BY: Francisco Gutierrez
Answer
26 days ago

Inset also appears to work fine:

wikitext = StringTake[WikipediaData["Ariguani"], 105];
wikitext2 = StringTake[WikipediaData["Puerto Triunfo"], 67];
GeoGraphics[{EdgeForm[Black], Polygon[Entity["Country", "Colombia"]], Red, PointSize[0.05], 
Point[GeoPosition[ Entity["City", {"Ariguani", "Magdalena", "Colombia"}]]], Blue, Point[GeoPosition[ 
Entity["City", {"PuertoTriunfo", "Antioquia", "Colombia"}]]], GeoLabels -> True, 
Inset[Style[Text[wikitext], Red, 12], {-71, 8.5}, Automatic, 10], 
Inset[Style[Text[wikitext2], Blue, 12], {-74, 4.5}, Automatic, 10]}]

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel
Answer
26 days ago

Group Abstract Group Abstract