The following JavaScript error suddenly appeared:
Google Maps API error: Google Maps API error: MissingKeyMapError
You can do that by accessing Application restrictions, then navigate to “HTTP referrers” then type in your domain's name. After making the necessary changes, click Save. Copy the API key because you will need it to get the map back on your website.
Yes. Now Google wants an API key to authenticate users to access their APIs`.
You can get the API key from the following link. Go through the link and you need to enter a project and so on. But it is easy. Hassle free.
https://developers.google.com/maps/documentation/javascript/get-api-key
Once you get the API key change the previous
<script src="https://maps.googleapis.com/maps/api/js"></script>
to
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=your_api_key_here"></script>
Now your google map is in action. In case if you are wondering to get the longitude and latitude to input to Maps. Just pin the location you want and check the URL of the browser. You can see longitude and latitude values there. Just copy those values and paste it as follows.
new google.maps.LatLng(longitude ,latitude )
As per Google recent announcement, usage of the Google Maps APIs now requires a key. If you are using the Google Maps API on localhost or your domain was not active prior to June 22nd, 2016, it will require a key going forward. Please see the Google Maps APIs documentation to get a key and add it to your application.
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