-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markers added far away from the initial Map Center never show on the map #2879
Comments
@adcooley alternately, you can set lnglat bounds to the map so that it never pans past where you'd like the markers to be |
@jfirebaugh I'd love to be able to reproduce the correct behavior… if I open the above jsbin, wait for the map to load, and zoom straight out, only one icon is visible. I think I see what you mean about moving 360 deg, but i assumed if I head in one direction, I would see the 2nd icon before reaching the non-repeated first icon again. |
@peterqliu I'll give that a go too, thanks! |
@jfirebaugh I understand now, took me a bit to grasp what was going on. I think the reason I was so confused is that when I add a layer source with 'symbol features', they are re-added to the map automatically as you scroll in either direction, whereas the Markers are not. For now I've worked up a solution that checks |
mapbox-gl-js version: 0.21.0
Steps to Trigger Behavior
center
is showing. The other will never show.center
for the map (using the commented code) to see that the other will now show.Expected Behavior
I expect all Markers added (especially when there are only 2) to show on the map when within the viewing range.
Actual Behavior
Only markers added near the inital Map
center
are showing. I've tested adding a lot to both vicinities and multiple will show, but only near the initialcenter
.The text was updated successfully, but these errors were encountered: