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 .
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.
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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With