A
A
Andrey Strelkov2021-08-02 16:15:29
leaflet
Andrey Strelkov, 2021-08-02 16:15:29

How can I get GeoJSON data while drawing geometry in Leaflet Draw?

Good afternoon, there is a task when displaying a map using Leaflet - to allow the user to create a certain geometry on it, for example, a polygon or a line.
But therefore, this geometry must be obtained in the form of GeoJSON data in order to save it to the database, for subsequent display on another map.

The question is how to get the resulting GeoJSON as we add features to the map?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-08-02
@freeExec

In the settings Drawyou can specify that edit me FeatureGroup, while she has a methodtoGeoJSON

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question