mpetroff / print-maps

High-resolution maps in the browser, for printing
https://printmaps.mpetroff.net/
MIT License
286 stars 51 forks source link

Navigation control position #24

Closed utilmind closed 4 years ago

utilmind commented 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");

mpetroff commented 4 years ago

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.