In this blog post, I will discuss google maps javascript api error: apinotactivatedmaperror and how to resolve ApiNotActivatedMapError issue step by step. Previously I have explained about Google Maps Location Sharing Not Updating Issue.
Google Maps API Error: ApiNotActivatedMapError
I have created a below simple google maps api example and getting the above error in the console.
<!DOCTYPE html> <html> <head> <title>Add Map</title> <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=&v=weekly" defer ></script> <link rel="stylesheet" type="text/css" href="./style.css" /> <script src="./index.js"></script> </head> <body> <h3>My Google Maps Demo</h3> <!--The div element for the map --> <div id="map"></div> </body> </html>
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 22nd June 2018, Google has updated its business model. Each API has its own separate billing, and for that reason, each API must be enabled individually. To get Geocoding on Google Maps to work properly the following APIs need to be enabled.
- Maps JavaScript API.
- Geocoding Service.
- Directions Service.
- Distance Matrix Service.
- Elevation Service.
- Places Library.
How to activate Google Maps Javascript API
You need to follow the below steps to enable the APIs:-
Step 1: Visit the following Google APIs & Services Console and click on the + ENABLE APIS AND SERVICES link as shown below:-

Step 2: You will be redirected to the API Library page as shown below:-

Step 3: Now search your desired API you want to enable by entering the name such as Maps Javascript API as shown below:

References:
Conclusion
I hope you liked this article on google maps javascript api error: apinotactivatedmaperror. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.
Leave a Reply