My Google Maps element does not work. What should I do?
Google has changed their Google map policies and now Google map APIs require an API key for new domains as of 22nd of June. Please refer to the following announcement: Google Geo Developers.
*Google has, starting July 16, 2018, made certain API and billing changes. In order to enable billing, you will need to provide credit card or billing account to Google Maps platform. Please note that we are in no way associated with Google Maps and their payment system and for any questions and issues regarding payments and billing you will need to contact them. Please refer to their FAQ and their documentation to learn more about these changes.
In order to resolve the issue with Google Map, please follow the next steps:
- First step is to get location’s longitude and latitude. This article explains how – Find or enter latitude & longitude.
- First of all, you will need to create an API key as per instructions here: Get api key.
- After creating, please locate the ad_hoc_portfolio.php file in Plugin Editor and replace the following:
wp_enqueue_script( 'gmaps_api', 'https://maps.googleapis.com/maps/api/js?v=&sensor=false' );
wp_enqueue_script( 'gmaps_api', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY' );
Please replace the YOUR_API_KEY with newly created API key.