react-geojson-editor
WARNING: This package is still under development, and therefore unstable |
---|
Allowing you to draw and edit shapes on maps!
Features
- onCreate action
- onUpdate action
- drawing mode
- edit mode
- view mode
- Drawing hollow polygons
- Center map
Usage
import React from 'react';import GeoJsonEditor from 'react-geojson-editor'; <GeoJsonEditor ="google api key" = = = = =/>
Other components
GoogleMapWithLoader
Used if you want to access the map instance within your own components
Example:
import GoogleMapContext from 'react-geojson-editor/google-map'; static contextType = GoogleMapContext; { if thiscontextmap thiscontextmap } { return <div>Access to map instance using GoogleMapContext</div>; }
import React from 'react';import GoogleMapWithLoader from 'react-geojson-editor/google-map'; <GoogleMapWithLoader > <YourComponent /></GoogleMapWithLoader>