|
|
@ -21,11 +21,6 @@ var drawControl = new L.Control.Draw({ |
|
|
|
circle:false, |
|
|
|
circle:false, |
|
|
|
polyline: false |
|
|
|
polyline: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
edit:{ |
|
|
|
|
|
|
|
featureGroup:drawnItems, |
|
|
|
|
|
|
|
edit:false, |
|
|
|
|
|
|
|
delete:false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var drawnControlEdit = new L.Control.Draw({ |
|
|
|
var drawnControlEdit = new L.Control.Draw({ |
|
|
@ -72,9 +67,12 @@ function openActivityMap(id) |
|
|
|
// console.log("cek data geojson", datageojson);
|
|
|
|
// console.log("cek data geojson", datageojson);
|
|
|
|
if (datageojson.type === 'FeatureCollection') { |
|
|
|
if (datageojson.type === 'FeatureCollection') { |
|
|
|
datageojson.features.forEach(feature => { |
|
|
|
datageojson.features.forEach(feature => { |
|
|
|
let layer = L.geoJSON(feature); |
|
|
|
let lGeoJson = L.geoJSON(feature); |
|
|
|
|
|
|
|
let layers = lGeoJson.getLayers(); |
|
|
|
|
|
|
|
layers.forEach(layer => { |
|
|
|
addDrawnLayer(layer) |
|
|
|
addDrawnLayer(layer) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if(datageojson.properties.radius){ |
|
|
|
if(datageojson.properties.radius){ |
|
|
|
let radius = datageojson.properties.radius |
|
|
|
let radius = datageojson.properties.radius |
|
|
@ -91,7 +89,6 @@ function openActivityMap(id) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
actionLocationAc = "edit"; |
|
|
|
actionLocationAc = "edit"; |
|
|
|
drawControl.remove(); |
|
|
|
|
|
|
|
map.addControl(drawnControlEdit); |
|
|
|
map.addControl(drawnControlEdit); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
currentGeoJson = ""; |
|
|
|
currentGeoJson = ""; |
|
|
|