Фикса баги
This commit is contained in:
parent
db32fa92bd
commit
0a32ed7a10
@ -701,15 +701,18 @@
|
||||
reader.readAsText(file);
|
||||
}
|
||||
});
|
||||
document.getElementById('exportGeoJSON').addEventListener('click', function () {
|
||||
if (vectorLayer) {
|
||||
const features = vectorLayer.getSource().getFeatures();
|
||||
const geojson = new ol.format.GeoJSON().writeFeatures(features, {
|
||||
featureProjection: 'EPSG:3857'
|
||||
});
|
||||
downloadGeoJSON(geojson);
|
||||
}
|
||||
});
|
||||
{% if request.user.is_superuser %}
|
||||
const exportGeoJSONButton = document.getElementById('exportGeoJSON')
|
||||
exportGeoJSONButton.addEventListener('click', function () {
|
||||
if (vectorLayer) {
|
||||
const features = vectorLayer.getSource().getFeatures();
|
||||
const geojson = new ol.format.GeoJSON().writeFeatures(features, {
|
||||
featureProjection: 'EPSG:3857'
|
||||
});
|
||||
downloadGeoJSON(geojson);
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
function getCoordinates(entity) {
|
||||
if (entity.type === 'LINE') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user