<GoogleMapReact
bootstrapURLKeys={{
key: '',
}}
defaultCenter={{
lat: 68.970663,
lng: 33.074918
}}
defaultZoom={14}
>
</GoogleMapReact>
import {
GoogleMap,
Marker,
DirectionsRenderer,
Circle,
MarkerClusterer,
useLoadScript
} from "@react-google-maps/api";
import { useState, useMemo, useEffect, useRef } from "react";
import "./Map.css";
const API_KEY = xxxxx;
export default function Map() {
const { isLoaded } = useLoadScript({
id: 'google-map-script',
googleMapsApiKey: API_KEY,
});
if (!isLoaded) return <div> Loading... </div>
return(
<GoogleMap zoom={10} center={{lat:100, lng: 100}} mapContainerClassName="mapContainer" >
<Marker position={{lat:100, lng: 100}}></Marker>
</GoogleMap>
)
}
Hi All,
I want to implement live navigation just like google maps in react (functional). Can anyone please help me how to implement this as i am not getting any idea. I have implemented upto DirectionRender but after that i am not getting any stuffs for this live navigation.
Hello :)
I am using https://react-google-maps-api-docs.netlify.app/#drawingmanager
getting black screen :(
can you help please