Google Maps API错误:Google Maps API错误:ApiNotActivatedMapError [英] Google Maps API error: Google Maps API error: ApiNotActivatedMapError
问题描述
我试图在我的项目中使用谷歌地图距离矩阵api来获得2个地方之间的距离。我也在谷歌开发者控制台中启用了这个api。但我不断收到错误 ApiNotActivatedMapError
。
我使用google提供的示例代码作为 $ rel =noreferrer> distance-matrix 。 当您使用库或服务通过 Maps-Javascript-API ,然后使用一个键,您只需激活 Google Maps JavaScript API 。
当您在链接的示例中遇到特定错误时,您显然未针对您的项目激活 Google Maps JavaScript API 。
$ b
更新:
自2016年6月22日起,您还需要为新应用程序激活相关的API(Webservice),以便使用以下功能:
- 地理编码服务
- 路线服务
- distanceMatrix服务
- 提升服务
- 地方图书馆
I am trying to use google maps distance matrix api in my project to get distance between 2 places. I have also enable this api in google developer console. But I am continuously getting error ApiNotActivatedMapError
.
I am using sample code provided by google as distance-matrix .
When you use a library or service via the Maps-Javascript-API, and use a key, you only need to activate the Google Maps JavaScript API .
When you get the particular error with the linked example you obviously didn't activate the Google Maps JavaScript API for your project.
Update:
since June 22, 2016 you need also to activate the related API(Webservice) for new applications when you want to use the following features:
- geocoding service
- directions service
- distanceMatrix service
- elevation service
- places library
这篇关于Google Maps API错误:Google Maps API错误:ApiNotActivatedMapError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!