Google Maps has query limits per IP:
- 2,500 free requests per day
- 10 requests per second
Normally its enough for sites but if you have website on some shared hosting this limit is splited to all websites which use Google gocoding on the same IP.
In this situation Google Maps returns error OVER_QUERY_LIMIT and geocoding in search or generating Latitude and Longitude after posting new advert can't be done. Solution for this is to set Google Maps API Key in DJ-Classifieds options individual for your website.
What are and how to get Google Maps Server and Browser keys
What Google says about Server key:
Create and use a server key if your application runs on a server. Do not use this key outside of your server code. For example, do not embed it in a web page. To prevent quota theft, restrict your key so that requests are only allowed from your servers' source IP addresses.
What Google says about Browser key:
Create and use a browser key if your application runs on a client, such as a web browser. To prevent your key from being used on unauthorized sites, only allow referrals from domains you administer.
Once you have the keys generated you should enter them in Components -> DJ-Classifieds -> Options -> Global tab in Map & Locations Settings section
Ok, I put the keys but something is still not working
Check if you have enabled these libraries:
- Google Maps Directions API
- Google Maps Geocoding API
- Google Maps Geolocation API
- Google Places API Web Service
To do so:
- go to Google API Console
- create new or select existing project
- click Library in left sidebar and enable libraries listed above (just click on the library and enable it on details page )
Note: If you're sure you have put the API keys correctly and something still does not work (you see errors in the console), make sure that you have not overrode those files:
Questions? Let us know!