Фикса баги

This commit is contained in:
zakhy 2025-04-17 11:52:50 +07:00
parent db32fa92bd
commit 0a32ed7a10

View File

@ -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') {