Closed utilmind closed 4 years ago
Hello! script.js contains code, which supposed to set up position for zoom buttons. However the code below does not works.
map.addControl(new mapboxgl.NavigationControl({ position: 'top-left' }));
Consider to switch to the following instead:
map.addControl(new mapboxgl.NavigationControl(), "top-left");
Thanks for pointing this out. It used to work but broke sometime in the past five years with a Mapbox GL JS update. Since the exact position doesn't matter, I just removed the location specification.
Hello! script.js contains code, which supposed to set up position for zoom buttons. However the code below does not works.
Consider to switch to the following instead:
map.addControl(new mapboxgl.NavigationControl(), "top-left");