I installed react-yandex-maps package in my ReactJS project. I am able to place a marker, but I cant move the camera of the map to a marker that was placed on the map. I could not find the method in the documentation. Can someone please share how to do it? Thank you!
<Map
className={styles.mapStyle}
instanceRef={ref => setMapRef(ref)}
modules={["control.ZoomControl", "control.FullscreenControl"]}
defaultState={{
zoom: 12,
controls: ["zoomControl", "fullscreenControl"],
}}
>
{
selectedPoint.length === 2 &&
<Placemark
geometry={selectedPoint}
/>
}
</Map>
This is part of my code, and the marker changes its position based on the state variable selectedPoint. Marker moves, but not the camera. I have ref of the map and console.log of the ref does not show the methods I need.