Search code examples
reactjsgoogle-mapsmern

How can I draw GooglMap in my React project?


I am not sure how to show googlemap in react project not cdn way. I already received API key, but I cannot . What is the reason? Sometimes map appeared and disappear soon. I am confused.

<GoogleMap
        mapContainerStyle={containerStyle}
        center={center}
        zoom={19}type here
onLoad={onLoad}
        onUnmount={onUnmount}
        onGoogleApiLoaded={({map, maps}) => this.renderMarkers(map, maps)}
      >
      <Marker position={center} title="HEre"/>
        
</GoogleMap>

Solution

  • Oh, I can help you. This is very simple. What is your hosting server name and domain. Google API can identify all connections. So When you registered in Google service, you have to implement correspondent domain.