标签: javascript reactjs maps
我是初级 React 开发人员。在我的新项目中有这样的事情。 (用红色矩形标记)有没有办法用这种方式获取地址?用户打开谷歌地图固定位置和地址文本显示?
答案 0 :(得分:1)
首先保存纬度和经度:https://developers.google.com/maps/documentation/javascript/examples/event-click-latlng
然后使用 GeoCoding 将 lat 和 lng 转换为地址:https://developers.google.com/maps/documentation/geocoding/overview