2

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?

0 Answers0