markers - auto-update on load

This commit is contained in:
Azgaar 2021-09-28 21:47:54 +03:00
parent 0c18589140
commit ee582ddf45
2 changed files with 44 additions and 3 deletions

View file

@ -453,11 +453,11 @@ function saveGeoJSON_Markers() {
track("export", "getJSON markers");
const features = pack.markers.map(marker => {
const {i, type, icon, x, y, size, fill, stroke, size} = marker;
const {i, type, icon, x, y, size, fill, stroke} = marker;
const coordinates = getQGIScoordinates(x, y);
const id = `marker${i}`;
const note = notes.find(note => note.id === id);
const properties = {id, type, icon, ...note, size, fill, stroke, size};
const properties = {id, type, icon, ...note, size, fill, stroke};
return {type: "Feature", geometry: {type: "Point", coordinates}, properties};
});