Fixing android location issue

revert-dabc3590
kamidu 8 years ago
parent facadb13b2
commit 9d733d6cc1

@ -19,7 +19,7 @@
var map; var map;
function loadLeafletMap() { function loadLeafletMap() {
var deviceLocationID = "#device-location", var deviceLocationID = "#device-location",
locations = $(deviceLocationID).data("locations"), locations = $(deviceLocationID).data("locations"),
location_lat = $(deviceLocationID).data("lat"), location_lat = $(deviceLocationID).data("lat"),
@ -28,7 +28,7 @@ function loadLeafletMap() {
zoomLevel = 13, zoomLevel = 13,
tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
attribution = "&copy; <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors"; attribution = "&copy; <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors";
if (locations) { if (locations && locations.locations.length > 0) {
var locationSets = locations.locations; var locationSets = locations.locations;
map = L.map(container).setView([locationSets[0].lat, locationSets[0].lng], zoomLevel); map = L.map(container).setView([locationSets[0].lat, locationSets[0].lng], zoomLevel);

Loading…
Cancel
Save