繁体   English   中英

如何使用 Google 地点 API 获取城市的地理编码(坐标)和人口(公民人数)? 我应该使用哪些请求?

[英]How to get the geocode(coordinates) and population (count of civils) of the city with the Google places API? Which requests I should use?

我正在 java spring-boot 开发一个学习项目。 我只用过地方 API(我有钥匙)。 我不想在另一个 Google API 注册,我怕计费))

例如,以下请求:

https://maps.googleapis.com/maps/api/geocode/json?address=Moscow&key=APP_KEY

完成代码 200 OK 和 JSON 响应

{
    "error_message": "This API project is not authorized to use this API.",
    "results": [],
    "status": "REQUEST_DENIED"
}

我通过获取地理编码解决了这个问题。 我刚刚启用了地理编码 API,而我来自 Places Api 的密钥可用于地理编码 API。

现在只问如何通过 Google API 获取人口。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM