Skip to content

Conceptual question on the relationship between Geoman and L.geoJSON #1338

Discussion options

You must be logged in to vote

Geoman is a plugin for Leaflet, and Leaflet is managing all the data on the map.

Here is how GeoJSON works with Leaflet / Geoman:

  1. A GeoJSON-Layer is basically only a string so it is not possible to use it as a layer in JavaScript / Leaflet. const geojson = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[72.881536,19.045568],[72.881536,19.06374],[72.909676,19.06374],[72.909676,19.045568],[72.881536,19.045568]]]}}]}
  2. You import the GeoJSON-String into Leaflet, which converts this string to an JavaScript-Objekt / Leaflet-Layer which can be displayed and modified by Leaflet. const geoGroup = L.geoJSON(geojson).
  3. Geoman get…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cmlnrowan
Comment options

Answer selected by cmlnrowan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants