You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
If you follow the “First steps with Mapbox GL for iOS” guide, you wind up initializing an MGLMapView, centering it on the U.S. President’s front yard, and placing an annotation there, all within -[ViewController viewDidLoad]. But if you do all that in -viewDidLoad, the annotations fail to display at the initial zoom level. They appear when you zoom in or out to a different zoom level and disappear when you reenter the initial zoom level.
At launch, the map view happens to show z15 tiles:
Then zoom in, right to the cusp of z16:
And zoom in just a little farther to z17:
Or zoom out, right to the cusp of z14:
And a little further out to 14:
The upshot is that our guide does not work as designed. We didn’t catch this issue in development because the iOS demo app only adds annotations in response to an action sheet button, not within -viewDidLoad.
Reproduces in ios-v0.3.1 as well as master, regardless of style.
OTOH, I think shape tiles behave differently from point tiles, since shape tiles are actually generated by geojson-vt so that it can simplify shapes as well as trivially create tiles which are wholly inside filled polygons.
I can get back into this shortly and try to provide more details after reviewing the code a bit.
Activity
incanus commentedon Jun 2, 2015
Likely the same issue as #1279.
1ec5 commentedon Jun 3, 2015
Because of this issue, bsudekum/react-native-mapbox-gl’s
-[RCTMapboxGL setAnnotations:]has to defer the call to-addAnnotations:or-removeAnnotation:./cc @bsudekum
incanus commentedon Jun 15, 2015
Let's hit this as part of our focus on annotation solidification in b3.
friedbunny commentedon Jun 18, 2015
Trying to draw a shape annotation in
viewDidLoadimmediately after map initialization fails to render the shape on the map, too.Here's a GeoJSON polyline demo for iOS using the same delay technique as
react-native-mapbox-gl.ansis commentedon Jul 1, 2015
@1ec5 I think this should be fixed by the
fix-1675branch. Can you check?@tmpsantos do these partial parsing changes look right? 5f90c60
1ec5 commentedon Jul 1, 2015
@ansis, yes, that fixes it. Thanks!
fix partial parsing for live tiles, fix #1675
ansis commentedon Jul 2, 2015
This was also fixed by @jfirebaugh's work that merged yesterday
tmpsantos commentedon Jul 2, 2015
Perfect.
42 remaining items
incanus commentedon Sep 21, 2015
OTOH, I think shape tiles behave differently from point tiles, since shape tiles are actually generated by geojson-vt so that it can simplify shapes as well as trivially create tiles which are wholly inside filled polygons.
I can get back into this shortly and try to provide more details after reviewing the code a bit.
fixes mapbox#1675: abstract annotation tile refresh check/render; tri…
fixes mapbox#1675: abstract annotation tile refresh check/render; tri…
fixes mapbox#1675: abstract annotation tile refresh check/render; tri…
Rewrite annotation invalidation strategy