diff --git a/Lora-Map/config-example/requests.conf.example b/Lora-Map/config-example/requests.conf.example index 9769295..1d31b5d 100644 --- a/Lora-Map/config-example/requests.conf.example +++ b/Lora-Map/config-example/requests.conf.example @@ -1,3 +1,2 @@ [js/nav.js] -your_api_key=abc start_location=50.7, 7.2 \ No newline at end of file diff --git a/Lora-Map/resources/js/marker.js b/Lora-Map/resources/js/marker.js index 2551daa..eb495e1 100644 --- a/Lora-Map/resources/js/marker.js +++ b/Lora-Map/resources/js/marker.js @@ -22,10 +22,11 @@ function parsedata() { if (markeritem['Icon'] === null) { marker = L.marker([markeritem['Latitude'], markeritem['Longitude']], { 'title': markeritem['Name'] }); } else { - var myIcon = L.icon({ - 'iconUrl': markeritem['Icon'], - 'iconSize': [56, 80], - 'iconAnchor': [0, 80] + var myIcon = L.divIcon({ + className: 'pos-marker', + iconSize: [56, 80], + iconAnchor: [0, 80], + html: '' }); marker = L.marker([markeritem['Latitude'], markeritem['Longitude']], { 'title': markeritem['Name'], 'icon': myIcon }); } diff --git a/Lora-Map/resources/js/nav.js b/Lora-Map/resources/js/nav.js index 8f31acd..8744612 100644 --- a/Lora-Map/resources/js/nav.js +++ b/Lora-Map/resources/js/nav.js @@ -1,10 +1,7 @@ var mymap = L.map('bigmap').setView(["{%START_LOCATION%}"], 14); -L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { - attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', - maxZoom: 20, - id: 'mapbox.streets', - accessToken: '"{%YOUR_API_KEY%}"' +L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' }).addTo(mymap); mymap.on("click", hidePanel);