Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps API error: Google Maps API error: ApiNotActivatedMapError

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 .

like image 919
abrar syed Avatar asked Feb 01 '16 06:02

abrar syed


People also ask

Why isn't my Google Maps API working?

There are a several reasons why your google maps may not be working, the most common issue being no Google Map API key set or set incorrectly. To use the Google Maps JavaScript API, you must register your app project on the Google Cloud Platform Console and get a Google API key which you can add to your app.

How do I see Google API errors?

Google APIs define a set of standard error payloads for error details, which you can find in google/rpc/error_details. proto. These cover the most common needs for API errors, such as quota failure and invalid parameters. Like error codes, developers should use these standard payloads whenever possible.


1 Answers

Old question.. But.. I had n similar issue recently with a ApiNotActivatedMapError using geocoding but Konerak's comment helped me get to this really nice post.

Basically, you can activate your API's here: https://console.developers.google.com/apis/library

Activating Google Maps JavaScript API along with the already activate Geocoding API solved my problem.

Hope it helps someone in a similar position :)

like image 63
Xylo Avatar answered Oct 03 '22 03:10

Xylo