Added geo location support for map

This commit is contained in:
Umar Adilov 2025-05-03 16:47:30 +05:00
parent 206f3da23e
commit 9878d20599

View File

@ -1,6 +1,10 @@
import { Map, Placemark, YMaps } from '@pbe/react-yandex-maps'; import {
GeolocationControl,
Map,
Placemark,
YMaps,
} from '@pbe/react-yandex-maps';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { Dispatch, SetStateAction } from 'react';
import { Point } from '../model'; import { Point } from '../model';
@ -58,6 +62,14 @@ export const YandexMap = ({
/> />
); );
})} })}
<GeolocationControl
options={{
position: {
bottom: 20,
right: 20,
},
}}
/>
</Map> </Map>
</YMaps> </YMaps>
); );