Try and locate the map more accurately

master
Gordon Williams 2022-01-12 14:21:18 +00:00
parent 1f744e8949
commit 4c193b3fd1
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ TODO:
var PREVIEWTILELAYER = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; var PREVIEWTILELAYER = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
//var TILELAYER = 'http://a.tile.stamen.com/toner/{z}/{x}/{y}.png'; // black and white //var TILELAYER = 'http://a.tile.stamen.com/toner/{z}/{x}/{y}.png'; // black and white
var map = L.map('map').locate({setView: true, maxZoom: 16}); // Create map and try and set the location to where the browser thinks we are
var map = L.map('map').locate({setView: true, maxZoom: 16, enableHighAccuracy:true});
// Tiles used for Bangle.js itself // Tiles used for Bangle.js itself
var bangleTileLayer = L.tileLayer(TILELAYER, { var bangleTileLayer = L.tileLayer(TILELAYER, {
maxZoom: 18, maxZoom: 18,