Есть ли у нас какой-либо способ показать значок текущего местоположения на картах Google с помощью реагирующих карт Google? Я не смог найти такие реквизиты для отображения значка текущего местоположения в документации Documtation_link .вот мой компонент, мне просто нужно показать значок текущего местоположения пользователя
const googleMapCard= compose(
withProps({
googleMapURL:
"https://maps.googleapis.com/maps/api/js?key=-----------,
loadingElement: <div style={{ height: `100%` }} />,
containerElement: <div style={{ height: `400px` }} />,
mapElement: <div style={{ height: `100%` }} />
}),
lifecycle({
componentWillMount() {
const refs = {};
this.setState({
bounds: null,
markers: [],
onMapMounted: ref => {
refs.map = ref;
},
onBoundsChanged: () => {
this.setState({
bounds: refs.map.getBounds(),
center: refs.map.getCenter()
});
},
onSearchBoxMounted: ref => {
refs.searchBox = ref;
},
onPlacesChanged: onChange => {
const places = refs.searchBox.getPlaces();
const bounds = new window.google.maps.LatLngBounds();
}
});
}
}),
withScriptjs,
withGoogleMap
)(props => (
<GoogleMap
onClick={e => {
props.onChange([e.latLng.lng(), e.latLng.lat()]);
}}
clickableIcons={true}
defaultZoom={8}
center={{ lat: props.value[1], lng: props.value[0] }}
defaultCenter={{ lat: props.value[1], lng: props.value[0] }}
ref={props.onMapMounted}
>
<SearchBox
ref={props.onSearchBoxMounted}
// bounds={props.bounds}
controlPosition={window.google.maps.ControlPosition.TOP_LEFT}
onPlacesChanged={() => {
props.onPlacesChanged(props.onChange);
}}
>
<input
type="text"
/>
</SearchBox>
<Marker position={{ lat: props.value[1], lng: props.value[0] }} />
)}
</GoogleMap>
));