{
"error_message": "Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account",
"routes": [],
"status": "OVER_QUERY_LIMIT"
}
由于此错误消息和 OVER_QUERY_LIMIT 状态,无法在谷歌地图中绘制折线。
最佳答案
请按照步骤操作以避免出错
启用以下 API
1 个谷歌地图 Android SDK
2 方向 API
3 地理编码API
4 地理定位API
5 个地方 API
Android 6 Places SDK
并且请创建一个计费帐户它不会收取任何费用只需要 2 INR 来检查您是否不是机器人
然后请将您的 Api key 传递给 URL (注意不要限制您的 API)
String url = "https://maps.googleapis.com/maps/api/directions/"+output+"?"+parameters + "&key=" + MY_API_KEY
完成这一步后它会起作用..
关于android - 在谷歌地图中绘制多边形线的 key 生成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52436867/