Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author webaware

    (@webaware)

    G’day thelondonsalad,

    You’re bumping up against Google’s API quota limits. By having so many maps on the page using address lookup, your address queries are being rejected after a number.

    This plugin tries to mitigate those limits by running address queries on the server, and caching for one week. However, your page has so many maps that the server-side address queries are also hitting the quotas (there’s a per-second limit on address lookups) so only some of the maps on that page have been cached. The rest get resolved in the browser, and that’s where you’re getting the pop-up warning.

    I suspect that you also have page caching (generally a good idea), which is preventing the uncached address queries from getting rerun on the server. i.e. page caching in this instance means that map address caching hits its limit and stays there.

    I currently don’t have any mitigation for this in the browser JavaScript; I plan to add it, but it’s not there yet. It would require staggering the address queries, perhaps queuing them up once they hit the query limit. One day, but not yet.

    In the meantime, there are a couple of options I can recommend.

    1. Premium Plan

    Google has a Premium Plan that increases your quota. No, I don’t know what it costs — you can discuss with Google. If you go this path, let me know and I’ll give you some code for adding your API key to the API script URL.

    2. Add coordinates to the maps

    You are hitting the query quota because your maps are all specified by address, without coordinates. That means each map needs an address query to get the coordinate first, before it can render the map. I do that server side first, with fallback to JavaScript. If you can specify the coordinates for the maps, there will be no address query and you won’t hit that query quota.

    So there it is! Let me know if I can help further.

    cheers,
    Ross

    Thread Starter thelondonsalad

    (@thelondonsalad)

    Thanks for that, I’d like to go for solution #2. Is it possible to know how can I add coordinates to a map, including which code I need to use to implement it?

    Now I’m using this snippet: example:

    [flexiblemap address=”35 Romford Road, Newham, London, E15 4LY, UK” zoom=”14″ title=”London Hotel Nirvana” width=”400″ height=”250px” showinfo=”false”directions=”true” description=”35 Romford Road, Newham, London, E15 4LY, UK”]

    Does replacing the field address with coordinates will suffice, and stupid question, how do I get the coordinates?

    Thanks in advance for your help and your lengthy explanation.

    Thread Starter thelondonsalad

    (@thelondonsalad)

    P.S. Which is the number of maps you can enclose in 1 page?

    Plugin Author webaware

    (@webaware)

    You can do address lookups on a range of websites; here’s one:

    https://www.latlong.net/

    You don’t need to remove the address attribute, just add a center attribute with the coordinates and the map will not need to do an address query.

    There are separate limits for number of map views (not maps on a page), and geocoding queries (address queries).

    https://developers.google.com/maps/documentation/javascript/usage
    https://developers.google.com/maps/documentation/geocoding/usage-limits

    cheers,
    Ross

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘OVER_QUERY_LIMIIT’ is closed to new replies.