I am having a GeoJson data and I am displaying it in map using Source and Layer using React-Map-GL, now I want to relocate the position by dragging but I dont know how to do in React? and this is my code
<Source
id={'pointData'}
type={'geojson'}
data={this.state.markerData}
>
<Layer
id={'circleLayer'}
source={'pointData'}
type={'circle'}
paint={{
'circle-radius': 6,
'circle-color': ['get', 'icon-color'],
'circle-stroke-width': 1,
'circle-stroke-color': '#fff',
'circle-stroke-opacity': 1
}}
/>
<Layer
id={'pointLayer'}
source={'pointData'}
type={'symbol'}
layout={{
'icon-image': ['get', 'icon-symbol'],
'icon-size': ['get', 'icon-size'],
'icon-allow-overlap': true,
'icon-ignore-placement': true
}}
paint={{
'icon-opacity': 1
}}
/>
</Source>
Can any help me here?
question from:
https://stackoverflow.com/questions/65933679/how-make-a-geojson-layer-draggable-using-react-map-gl-in-react 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…