- Colection of 65 PHP scripts for $4.29 each
Recently Google announced that they are changing the way their free Google Map service operates. The most important update related to how maps are loaded using JavaScript code in our scripts is the need to have an API key if you use Google Maps. They have also put a limit on a number of times maps and API calls can be loaded, so please read their blog and learn more "from the source".
BEFORE
Basically, until now maps were loaded using a simple JavaScript code. This is an example:
<script async defer src="https://maps.googleapis.com/maps/api/jscallback=initMap" type="text/javascript"></script>
NOW
From now on they require maps to be loaded using your own API key. So, the code above will look like this:
<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" type="text/javascript"></script>
All Google Maps JavaScript applications now require authentication using such API key. Read how to create a key for yourself. Please, make sure when you generate your key that it is for Google Map service.
Unfortunately, it is not possible for us, developers, to obtain a key which can be used in all our products. Instead, each client has to get such a key for every website where Google Map is used. Rather annoying for sure, but you must do it, otherwise Google Maps will not load.
We have a number of scripts that use Google Maps. Below you can find instructions for each one of them. In the upcoming weeks/months, we will launch an update for each product, so that such API key can be added directly via the script administration page. Until then, and for all older versions of our products, you have to update your files manually.
Please, first create your API key for the website where you use our script!
Script | Files to be updated |
Car Rental Script | app/controllers/pjFront.controller.php app/controllers/pjAdminLocations.controller.php |
Food Delivery Script | app/controllers/pjAdminLocations.controller.php app/controllers/pjApp.controller.php app/web/js/pjFoodDelivery.js |
Store Locator | app/controllers/pjAdminStores.controller.php app/controllers/pjFront.controller.php |
Property Listing Script | app/controllers/pjAdminProperties.controller.php templates/default/js/pjListings.js |
Travel Tours Script | app/controllers/pjAdminListings.controller.php |
Vacation Rental Script | app/views/pjListings/elements/layout_1/includes/_map.php app/views/pjListings/elements/layout_1/includes/viewgooglemap.php app/views/pjListings/elements/layout_2/includes/_map.php app/views/pjListings/elements/layout_2/includes/viewgooglemap.php Version 3.3 and above /app/controllers/pjAdminListings.controller.php /app/plugins/pjDrawSearch/controllers/pjDrawSearch.controller.php /app/plugins/pjDrawSearch/views/pjDrawSearch/pjActionControl.php /templates/default/elements/map.php |
Yellow Pages Script | app/controllers/pjAdminListings.controller.php app/controllers/pjListings.controller.php templates/default/pjActionMap.php |
Before editing the files, make a backup in case something goes wrong. Note that if you have a User Licence for the script, you will not be able to edit these files. You have two options:
- If you've purchased your script within the last 12 months, we can make this update for you for FREE. Otherwise, a small charge will occur.
- Upgrade to Developer Licence and try to do it yourself. Once you upgrade, you will be eligible for a 12-month support and we can then do it for you.
Open the files using Notepad or another plain text editor and search for this string:
"http://maps.googleapis.com/"
You will find this string in a number of places. You should add your API key in the URLs, so they look like this:
http://maps.googleapis.com/maps/api/?key=YOUR_API_KEY
http://maps.googleapis.com/maps/api/geocode/json?key=YOUR_API_KEY&address…
Let us know, if you have any questions!