Skip to content

Instantly share code, notes, and snippets.

@m3l1nd4
Last active April 1, 2021 06:02
Show Gist options
  • Save m3l1nd4/10ea305d29f430e1e01106a29e4b1055 to your computer and use it in GitHub Desktop.
Save m3l1nd4/10ea305d29f430e1e01106a29e4b1055 to your computer and use it in GitHub Desktop.
let map = null;
//For the edit-shop page, the map needs a different name
if (!map) map = L.map('newShopMap', {doubleClickZoom: false}).locate({setView: true, maxZoom: 12});
map.setView([35.40, 139.50], 12);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment