M
M
MarsFM2019-08-28 17:50:52
Yandex maps
MarsFM, 2019-08-28 17:50:52

How to get label coordinates in react when its position changes?

Plz tell me how to get the label coordinates in react when its position changes?

<Placemark 
     key={point.id} 
     options={{useMapMarginInDragging: true, draggable: true}}
     geometry={point.coords} 
     modules={['geoObject.addon.balloon', 'geoObject.addon.hint']}
      properties={{ hintContent: `${point.name}` }}
      // behavior={{dragend: true}}
     // dragend={data => console.log(data)}
 />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-08-28
@sportredwhite

onDragEnd={e => console.log(e.get('target').geometry.getCoordinates())}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question