Message Boards Message Boards

1
|
1363 Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Showing Geo points, tags, and geographic information in one output map

I have two points with a name and a latitude and longitude that I would like to plot on a map. The map would show the location as a red dot tagged by the name.

bw = GeoPosition[{51.7091931533413, -1.25457498392513}];
lba = GeoPosition[{51.4976561183666, -0.127636445324134}];

When I use GeoListPlot I get a map with the points and tag, but it doesn’t have geographic information.

points = GeoListPlot[{
   Labeled[Point[bw], "BW", Left],
   Labeled[Point[lba], "LBA", Left]
}]

When I use GeoGraphics I get a map with the points and geographic information, but I can’t get the tags. When I put used Labeled I get the message, Labeled is not a Graphics primitive or directive. I’ve tried other approaches, but none work.

GeoGraphics[{Red, PointSize[Large],
  Point[bw],
  Point[lba]
}]

How can I get a map with the points, tags, and geographic information?

POSTED BY: Dan O'Leary
2 Replies

The solution with Text solved the problem for me. Thank you.

POSTED BY: Dan O'Leary

It appears that GeoGraphics does not support Labeled. For that purpose I use Text:

GeoGraphics[{Red, PointSize[Large],
  Point[bw], Point[lba], Text["bw", bw, {0, 1}]}]

GeoListPlot does not need Point:

GeoListPlot[{Labeled[bw, "BW", Left],
  Labeled[lba, "LBA", Left]}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract