Message Boards Message Boards


[✓] Insert text in maps?

Posted 3 months ago
3 Replies
2 Total Likes

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

3 Replies

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

Simple and clear. Thanks!

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



Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract