How do I add an event listener for changes in the Map view? i.e. as users zoom/scroll/pan the map, I'd like to respond and update pins on the map, etc.
P.S. Documentation is more than javadoc style comments. As a Mapbox newbie I find the docs very limited. Documentation should be detailed descriptions of how to accomplish goals. Merely commenting methods and properties isn't very useful unless you already know the library.
Thanks for the feedback @Randgalt. We have do have a collection of GL JS examples at https://www.mapbox.com/mapbox-gl-js/examples, many of which demonstrate how to use the event system. Let me know if there's a type of example you'd like to see on that page.
Agreed the docs are not newbie friendly. For the life of me I can't figure out how to get a "map has been moved" event so I can rewrite the URL like google does.
https://www.google.com/maps/@32.8051435,-80.3069422,10z
Thanks
@lucaswoj
@nitrag you can initialize your map with the hash option. The Map API docs has more details.
AWESOME! Even better that its built in!!!! Thanks!
Most helpful comment
P.S. Documentation is more than javadoc style comments. As a Mapbox newbie I find the docs very limited. Documentation should be detailed descriptions of how to accomplish goals. Merely commenting methods and properties isn't very useful unless you already know the library.