geoman-io / leaflet-geoman

🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.21k stars 433 forks source link

Text and circle layers do not produce correct geojson #1229

Closed avisitor closed 2 years ago

avisitor commented 2 years ago

When saving geojson for the geoman-created layers with text or circles, only a blank marker is saved, no circle and no text:

var geojson = map.pm.getGeomanLayers( true ).toGeoJSON();

0:
geometry: {type: 'Point', coordinates: Array(2)}
properties: {}
type: "Feature"
[[Prototype]]: Object
1:
geometry: {type: 'Point', coordinates: Array(2)}
properties: {}
type: "Feature"
[[Prototype]]: Object
length: 2
Falke-Design commented 2 years ago

You need to store the properties by your self. toGeoJSON() is a Leaflet function and not one from Geoman.