Issues with map and google api

Home Forums Calendar Products Events Calendar PRO Issues with map and google api

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #1196580
    Darren
    Participant

    Hi,

    I have the API key setup correctly and am still getting the message The latitude and longitude for your venue could not be fetched. The Google Maps API daily query limit has been reached!

    However, I am also getting Fixed geolocation data for 98 venues so it seems to be working but it does not clear the those fixed ones from the UI. It is still stating “You have 98 venues for which we don’t have geolocation data. We need to use the Google Maps API to get that information. Doing this may take a while (approximately 1 minute for every 200 venues).”

    I have looked at my API usage and it does not appear to be hitting the API according to google so I added the snippet from https://theeventscalendar.com/support/forums/topic/latitude-and-longitude-for-your-venue-could-not-be-fetched-google-maps-api/ and that did nothing either.

    Also when there are no events the map loads in showing Gabon and the site is based in the UK, how do you set it so the map defaults to the UK? or certain latlng by default?

    Cheers

    Darren

    #1197130
    Geoff B.
    Member

    Good afternoon Darren and welcome to the Events Calendar Support forum!

    Thank you for reaching out to us.

    We are sorry to hear about the Google Map API giving you trouble. Yikes!
    I would love to help you with this topic.

    With your permission, I would like to offer to log in to look (not to touch) so that we leave no stone unturned.

    To make things more efficient, would you mind giving me some specific example (URLs) of problematic venues ?

    Finally, could you tell me which web host your are using ? I am asking because certain webhosts will force the use of their shared Google Map API.

    Best regards,

    Geoff B.

    #1201147
    Darren
    Participant

    This reply is private.

    #1201895
    Geoff B.
    Member

    Good evening Darren,

    Thank you for writing back and for the requested information.

    I apologize for taking a moment to grasp to full extent of the issue.
    It all makes sense now.

    The snippet my colleague Cliff provided was alas never confirmed to be working.

    With that in mind, I went ahead and conducted a review of all issues similar to yours.
    As you might have read, the issue is that not all the Google Map calls from our plugin are done using the API.

    This is something that we have a ticket for and that will get addressed. Unfortunately, I cannot commit to a release date at this point. But stay tuned, you will be contacted when the fix is released.

    In the meantime, it appears that the only other workarounds would be to ask your web host if it is possible to remove that limit for your site or perhaps move you to a different server that does not have that limit.

    I wish I had a better answer for you, but for now it’s the best one I have.

    Best regards,

    Geoff B.

    #1201992
    Darren
    Participant

    Thanks Geoff, it’s not a massive issue as it seems to be working but just not clearing from the admin area.

    I have opened a ticket with my hosting to see if they do override the google maps api key. Not sure that they do but we will see.

    also, you have not answered the issue about the map

    Also when there are no events the map loads in showing Gabon and the site is based in the UK, how do you set it so the map defaults to the UK? or certain latlng by default?

    #1202362
    Geoff B.
    Member

    Good evening Darren,

    Thank you for your understanding and definitely keep me posted as to what your web host can offer.

    Also when there are no events the map loads in showing Gabon and the site is based in the UK, how do you set it so the map defaults to the UK? or certain latlng by default?

    You are right, the second question went unaddressed. My bad.
    Let me provide you with some answers.

    This is closely tied to the first issue. When the API is not able to work properly, it seems to default to West Africa for some reason.

    As you can read about here: https://theeventscalendar.com/knowledgebase/troubleshooting-map-view/ , the only known workaround for now would be to try to use the latitude and longitude settings in your events.

    Best regards,
    Geoff B.

    #1202660
    Darren
    Participant

    Thanks again Geoff, The maps on the events don’t display also at the moment.

    I have spoken to my web host and they do not replace the api key? is there a test that can be done to check this?

    Cheers

    Darren

    #1202920
    Geoff B.
    Member

    Hey Darren,

    I am not sure I understand your web host’s reply.
    Do they mean that they do not offer the possibility of having your own separate Google Map API key configured or that they do not have a Google Map API key set up for their servers ?

    Just to clarify, we are not accusing them of substituting our API key.
    What I am saying is that some of our Google Maps call are made using whatever key is found on the server (even if there is none).

    What is happening is that since last June, Google has really increased limitations on access to Google Maps to force users to use a Google Map API key. One of the things they did to enforce that is limit the number of requests allowed per ip address.

    Since it sounds like you are on a shared hosting plan, what is probably going on (wether or not a key is in place on the server) is that all the sites hosted on that shared plan are using the same server ip address. As a result the limit gets reached pretty fast.

    You can read more on that topic here: https://developers.google.com/maps/documentation/geocoding/usage-limits

    Once again I want to reiterate that we are terribly sorry for that.
    Although it is not much of a solution, getting at least a VPS level hosting would instantly fix this issue.

    Best regards,

    Geoff B.

    #1203035
    Darren
    Participant

    right, so no matter what key is entered it is basically not being used and just using the IP address of the server? You made it sound that the host was replacing it with their own 😉

    So the bug is the event calendar does not use the google maps api key in the settings?

    #1203369
    Geoff B.
    Member

    Good afternoon Darren,

    Actually, the issue is that the key is not used all Google Maps API calls, only certain ones.

    When the key is not used, the ip is used as a default, hence the problem.

    Typically, that is something that, even though it is less than ideal, can be worked around.
    In your case, short of getting a dedicated IP, a VPS or changing web hosts, I unfortunately have no other solution to offer.

    With that in mind, I did ask the Dev team if a snippet was possible for the “fix venue geolocation” button.

    Best regards,

    Geoff B.

     

    #1204023
    Geoff B.
    Member

    Hey Darren,

    As promised, I followed up on this with Dev to see if any snippet could be used to help with at least fixing the Venue Geolocation .

    Here is the feedback I received.

    You could use https://gist.github.com/cliffordp/9d6c25feb389f98e8ae09a41273a3488 or simply use one of the following functions tribe_get_option( Tribe__Events__Google__Maps_API_Key::api_key_option_name ) or tribe_get_option( 'google_maps_js_api_key' )

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1204673
    Darren
    Participant

    Nope that didn’t work

    got the following messages

    The latitude and longitude for your venue could not be fetched. The Google Maps API daily query limit has been reached!

    Fixed geolocation data for 159 venues

    On reloading the settings I still get the 159 venues need fixing and the maps don’t work.

    This is a pretty annoying bug and it needs an ETA.

    #1205081
    Geoff B.
    Member

    Good evening Darren,

    Yikes, that’s not good.
    I wish it did.

    I totally understand how frustrating that can be for our shared hosting users such as yourself.
    I have escalated this to my supervisor to make sure this issue gets flagged as a top priority for the next Maintenance Release.

    With that in mind, unfortunately, I cannot commit to a release date at this point.
    But stay tuned, you will be contacted when the fix is released.

    As stated before, short term, I am afraid your only workaround would be to either use a different webhost, get a dedicated IP or upgrade to a hosting plan that is not shared.

    I realize this is far from great, but until this goes through our complete Dev release cycle, I unfortunately have no other alternative to offer.

    Best regards,

    Geoff B.

    #1205728
    Darren
    Participant

    This reply is private.

    #1206270
    Geoff B.
    Member

    Good evening Darren,

    I agree.

    This needs to be fixed so that everybody can fix their venue geolocation should they need to.

    It has been placed in the next Maintenance release Dev cycle.
    As you can guess, that means that it needs to also be tested thoroughly to prevent further issue.

    Thank you for your understanding.

    Best regards,

    Geoff B.

Viewing 15 posts - 1 through 15 (of 17 total)
  • The topic ‘Issues with map and google api’ is closed to new replies.