This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MGLUserAnnotation not displaying #1912
Comments
Forgot to mention: Xcode 7 Beta 3, 0.5.2 mapbox-gl build, targeting ios9. |
Yes, this looks like an iOS 9-specific issue and the fix appears to work. |
I have occasionally noticed an issue that I've been meaning to report with the user dot related to wrapped panning horizontally and the dot prematurely then disappearing. Try zooming out all the way, panning the world past a few times, and see what I mean. Not sure if related. |
1ec5
added a commit
that referenced
this issue
Jul 23, 2015
1ec5
added a commit
that referenced
this issue
Jul 24, 2015
Avoid passing invalid locations along to the map view delegate or user location annotation. Also, If the user wants to visit the Prime Meridian or Equator, that’s their prerogative. Mapbox GL should show them where they’re at. Null Island is a different story. Fixes #1912.
AndwareSsj
pushed a commit
to AndwareSsj/mapbox-gl-native
that referenced
this issue
Nov 6, 2015
Avoid passing invalid locations along to the map view delegate or user location annotation. Also, If the user wants to visit the Prime Meridian or Equator, that’s their prerogative. Mapbox GL should show them where they’re at. Null Island is a different story. Fixes mapbox#1912.
AndwareSsj
pushed a commit
to AndwareSsj/mapbox-gl-native
that referenced
this issue
Nov 6, 2015
Following the same steps from mapbox#1548 and mapbox#1912 for GLFW and iOS ports. Also removed a redundant check if transform state is changing since we're already dealing with that.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Looking at Stackoverflow post here it seems like
MGLUserLocation::setLocation
tests the distance between new and old locations before actually setting the new value. Because the initial latitude and longitude as set toMAXFLOAT
, one of the conditionals checking distance always returns zero, preventing the new location value from being set:I think this may be preventing the display of the MGLUserLocation annotation.
To test out my theory, I made the small change below (
MGLUserLocation.m
) and it seems to have worked - the MGLUserAnnotation now renders on my map as a pulsating circle.The text was updated successfully, but these errors were encountered: