I have found a draw tool in OpenLayers-3 which allows us to draw on a map (see http://openlayers.org/en/v3.2.0/examples/draw-features.html). Is there an API in openlayers to store the drawn feature in geojson format?
[GIS] How to store a drawn feature in OpenLayers
geojsonopenlayers
Related Question
- [GIS] Add a custom control in OpenLayers 3 but it was hide
- [GIS] How to fit an OpenLayers view to an extent that spans the map extent (wrap) or IDL
- [GIS] Taking draw features as GeoJSON after completed drawing
- OpenLayers – Moving Polygon Like a Circle with Modify Interaction in OpenLayers 4
- OpenLayers – View and Save Coordinates from Drawn Features in OpenLayers 5
Best Answer
Further to the answer above, this is how I'm grabbing the draw features before storing them in an indexed db for offline storage:
If you then console log(routeFeatures it should give you a JSON Feature Collection