英文:
How can I draw GooglMap in my React project?
问题
我不确定如何在React项目中展示Google地图,而不是使用CDN方式。我已经收到API密钥,但我无法做到。原因是什么?有时地图会出现然后很快消失。我感到困惑。
<GoogleMap
mapContainerStyle={containerStyle}
center={center}
zoom={19}
onLoad={onLoad}
onUnmount={onUnmount}
onGoogleApiLoaded={({map, maps}) => this.renderMarkers(map, maps)}
>
<Marker position={center} title="这里"/>
</GoogleMap>
英文:
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>
答案1
得分: -1
Oh, I can help you.
这很简单。
What is your hosting server name and domain.
Google API可以识别所有连接。
So When you registered in Google service, you have to implement correspondent domain.
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论