-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
The "Add points, polygons and text to a map" example (here) duplicated below conceals the star point when I zoom about 10 mouse clicks. It seems to be that the point is printed over when the tiles update.
using Tyler, GLMakie
using Tyler.TileProviders
using Tyler.MapTiles
using Tyler.Extents
provider = TileProviders.Esri(:WorldImagery)
# point location to add to map
lat = 34.2013;
lon = -118.1714;
pts = Point2f(MapTiles.project((lon,lat), MapTiles.wgs84, MapTiles.web_mercator))
delta = 1
extent = Extent(X = (lon - delta/2, lon + delta/2), Y = (lat-delta/2, lat+delta/2));
m = Tyler.Map(extent; provider, figure=Figure(; size=(1000, 600)))
# wait for tiles to fully load
wait(m)
objscatter = scatter!(m.axis, pts; color = :red,
marker = '⭐', markersize = 50)
# hide ticks, grid and lables
hidedecorations!(m.axis)
# hide frames
hidespines!(m.axis)
# Plot a plygon on the map
p1 = (lon-delta/8, lat-delta/8)
p2 = (lon-delta/8, lat+delta/8)
p3 = (lon+delta/8, lat+delta/8)
p4 = (lon+delta/8, lat-delta/8)
polyg = MapTiles.project.([p1, p2, p3, p4], Ref(MapTiles.wgs84), Ref(MapTiles.web_mercator))
polyg = Point2f.(polyg)
poly!(polyg; color = :transparent, strokecolor = :black, strokewidth = 5)
# Add text
pts2 = Point2f(MapTiles.project((lon,lat-delta/6), MapTiles.wgs84, MapTiles.web_mercator))
text!(pts2, text = "Basic Example"; fontsize = 30,
color = :darkblue, align = (:center, :center)
)
m
#10 mouse clicks and star disappears
Metadata
Metadata
Assignees
Labels
No labels