Geocoding error – quota exceeded

Home Forums MapPress Support Geocoding error – quota exceeded

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16117
    karenoconnell
    Participant

    Hi Chris,

    I am unable to use the geocode function successfully – it continually returns an error stating that the call exceeds the quota limit. I am only in test mode and refreshing test maps a few times a day so this should not be the case. I have created an API key in the Google Developers’ Console also to see if it can overcome the issue but there does not appear to be anywhere within the settings or the function call to assign a key for the Geocode API which would enable overcoming the quota limit for calls. Any ideas as to how to overcome this – it has not successfully worked for me and it is the reason I purchased your plugin.

    This is the code I am testing

    <?php

    $collect_from = $data[‘collect_from_address’];
    $collect_from_address = explode(“,”,$collect_from);
    $collect_from_town = $collect_from_address[1];
    $deliver_to = $data[‘deliver_to_town’];

    $mymap = new Mappress_Map(array(“width” => 600));

    $mypoi_1 = new Mappress_Poi(array(“title” => “Collection Point”, “body” => $collect_from_town, “address” => $collect_from_town));
    $mypoi_1->geocode();

    $mypoi_2 = new Mappress_Poi(array(“title” => “Delivery Point”, “body” => $deliver_to, “address” => $deliver_to));
    $mypoi_2->geocode();

    $mymap->pois = array($mypoi_1,$mypoi_2);
    echo $mymap->display();

    ?>

    Thanks,
    Karen

    #16118
    Chris
    Keymaster

    Hi Karen,

    If you’re on a shared server, then another user on that server may have reached the geocoding limit. There’s some information about this problem in the documentation and the FAQ.

    I was about to tell you you’re out of luck with that server, but I just checked Google’s docs and they seem to have changed their rules.

    Previously the geocoder didn’t even accept an API key. The key only affected the number of maps that could be displayed. However, at some point this must have changed. The geocoder now seems to support API keys, which would imply that you could get a ‘private’ 2500-request limit.

    I’ve updated MapPress to pass the API key to the geocoder, and it seems to work. Please send me an email and I’ll send you a copy of the updated code to test.

    #16121
    karenoconnell
    Participant

    Hi Chris – it’s my own development machine so there isn’t another requester from the same IP that might be causing the quota to be exceeded.

    My email address is karen@northstarforwarding.com if you want to drop that code to me.

    Thanks for the quick response,
    Karen

    #16122
    Chris
    Keymaster

    Hi,

    If it’s a local machine I’m not sure why you would be exceeding the quota. What exact message do you get?

    Is your machine using a static IP?

    If it’s a local static machine you shouldn’t need an API key at all, so I’m not sure the new code will fix the root problem, but I’ll send it to you anyway.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.