Google Maps API Error: Google Maps API Error: ApiNotActivatedMapError

I am trying to use google maps distance matrix api in my project to get the distance between two places. I also enabled this api in the google developer console. But I constantly get ApiNotActivatedMapError error.

I am using the sample code provided by google as distance-matrix .

+8
google-maps google-maps-api-3
source share
2 answers

When you use a library or service through the Maps-Javascript-API and use the key, you need to activate the Google Maps JavaScript JavaScript API ... p>

When you get a specific error with a related example, you obviously did not activate the Google Maps JavaScript API for your project.

Update:

from June 22, 2016 you also need to activate the associated API (Webservice) for new applications if you want to use the following functions:

  • geocoding service
  • route service
  • distanceMatrix service
  • altitude service
  • host library
+22
source share

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

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

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

Hope this helps someone in a similar position :)

+1
source share

All Articles