Home › Forums › Calendar Products › Events Calendar PRO › The Google Maps API daily query limit
- This topic has 9 replies, 5 voices, and was last updated 8 years, 3 months ago by
Support Droid.
-
AuthorPosts
-
September 26, 2017 at 1:01 pm #1355177
Thor Sarup
ParticipantI’m too getting that error. I have checked that the API key is correct.
Any suggestions?I’m almost regretting buying this plugin since it seems my client is forced to typing in lat long manually?
Could you provide an easier solution? Or are we forced to use VPS – and will that solve the problem?I was thinking having a button to manually get lat/lng like:
http://maps.googleapis.com/maps/api/geocode/xml?address={Vestergade+38,+1550+K%C3%B8benhavn+V,+Denmark}&sensor=false
and then fetching the lat/lng from the xml response?September 26, 2017 at 7:21 pm #1355314Cliff
MemberHi, Thor. Sorry for the frustrations you’ve experienced.
Google Maps sets the API limitations. Please reference https://theeventscalendar.com/knowledgebase/setting-up-your-google-maps-api-key/#using-your-key
Sorry if I’m not fully understanding the situation… I’m not sure why you’d think having a separate button would be different than using The Events Calendar’s Google Maps attempt to geolocate based on the entered address.
Please let me know your thoughts on this issue. If you’re experiencing a Google Maps console error at your site, please share the exact message(s) you’re seeing and at which URL(s).
Thank you.
September 28, 2017 at 1:24 am #1355971Thor Sarup
ParticipantI dont know if a separate button will work. But this code for getting lat/lng seems to work:
$add = urlencode("Vestergade 19, Copenhagen, Denmark"); // address stuff $request_url = "http://maps.googleapis.com/maps/api/geocode/xml?address={".$add."}&sensor=true"; // the request URL you'll send to google to get back your XML feed $xml = simplexml_load_file($request_url) or die("url not loading");// XML request $status = $xml->status;// GET the request status as google's api can return several responses if ($status=="OK") { //request returned completed time to get lat / lang for storage $lat = $xml->result->geometry->location->lat; $long = $xml->result->geometry->location->lng; echo "$lat,$long"; //spit out results or you can store them in a DB if you wish } if ($status=="ZERO_RESULTS") { //indicates that the geocode was successful but returned no results. This may occur if the geocode was passed a non-existent address or a latlng in a remote location. } if ($status=="OVER_QUERY_LIMIT") { //indicates that you are over your quota of geocode requests against the google api } if ($status=="REQUEST_DENIED") { //indicates that your request was denied, generally because of lack of a sensor parameter. } if ($status=="INVALID_REQUEST") { //generally indicates that the query (address or latlng) is missing. }from https://stackoverflow.com/questions/17843536/google-geocoding-api-error-over-query-limit.
Though the post also states there can be limits here.September 28, 2017 at 9:49 am #1356255Cliff
MemberThanks for sharing.
Did you enter your Google Maps API Key at wp-admin > Events > Settings > APIs tab?
Notes if you do choose to go forward with a custom URL:
- Your request URL should be HTTPS, not HTTP, and it should include your API key (by adding &key=YOUR_API_KEY to the URL)
- The status codes are available at https://developers.google.com/maps/documentation/geocoding/intro#StatusCodes
October 1, 2017 at 10:39 am #1357519Thor Sarup
ParticipantI have enterede the API key in settings, yes.
October 2, 2017 at 1:49 pm #1357965Cliff
MemberI believe this snippet is outdated now, but maybe it’s worth a try:
https://gist.github.com/cliffordp/9d6c25feb389f98e8ae09a41273a3488
Please let me know how this goes for you.
October 24, 2017 at 9:35 am #1368168Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support TeamDecember 19, 2017 at 11:58 am #1409052Courtney
MemberHey there Thor
We’ve just released an update that should fix this bug. You can read more about it at http://m.tri.be/19tp. Please update your plugins and let us know if you are still experiencing this or if we can close out this ticket.
Note: We suggest testing updates on a staging server (https://theeventscalendar.com/knowledgebase/creating-using-wordpress-staging-site/).
Thanks
Courtney 🙂January 10, 2018 at 8:37 am #1422470Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘The Google Maps API daily query limit’ is closed to new replies.
