The Google Maps API daily query limit

Home Forums Calendar Products Events Calendar PRO The Google Maps API daily query limit

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1355177
    Thor Sarup
    Participant

    I’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?

    #1355314
    Cliff
    Member

    Hi, 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.

    #1355971
    Thor Sarup
    Participant

    I 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.

    #1356255
    Cliff
    Member

    Thanks 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:

    #1357519
    Thor Sarup
    Participant

    I have enterede the API key in settings, yes.

    #1357965
    Cliff
    Member

    I 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.

    #1368168
    Support Droid
    Keymaster

    Hey 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

    #1409052
    Courtney
    Member

    Hey 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 🙂

    #1422470
    Support Droid
    Keymaster

    Hey 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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘The Google Maps API daily query limit’ is closed to new replies.