Events missing VenueLat and VenueLng meta_key values

Home Forums Calendar Products Events Calendar PRO Events missing VenueLat and VenueLng meta_key values

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #140354
    Barry
    Member

    OK, so nothing after coordinates. It would be great to view the complete response – could you make a slight change to the snippet and change:

    <code>return "<p $highlight>$result</p>$content";</code>

    To:

    <code>return "<p $highlight>$result" . print_r( $data, true ) . "</p>$content";</code>

    (We might get a fairly lengthy bit of output this time round.)

    This sure is proving to be a tricky (and frustrating) one! At least the memory test did yield some changes…although I’m still not sure why it’d require such a high limit or why it seemed to work temporarily?

    I’m not really sure at this point. It’s certainly shaping up to be pretty specific to your installation/server, though. In one other case it stemmed from importing venue CSV data and the addresses contained some special characters but was not UTF8 encoded.

    It sounds like in your case this isn’t a problem that is limited to events/venues pulled in by CSV, though, so I’m not sure it’s actually the same problem.

    #140544
    irishrunner16
    Participant

    Ok, so at one point this morning I hit a page with the geofetch query on it and was seeing coordinates. I modified the snippet and got the following output:

    Coordinates: stdClass Object ( [error_message] => You have exceeded your daily request quota for this API. [results] => Array ( ) [status] => OVER_QUERY_LIMIT )

    So that makes sense why it was not always getting the coordinates. I talked to our management team and they informed me that because Google has such low limits, it isn’t really cost effective for a big site like ours. We have an account with MapQuest. Given that, is it possible to change the source (from Google to MapQuest) that the geocoordinates are pulled from when an event is submitted/created? I know it’d be a customization, but if you could point me in the direction of what files(s) I’d need to update, that’d be extremely helpful.

    Thanks again for helping figure out what the issue was! Look forward to hearing any suggestions you have on changing where the coordinates are pulled from when events are created.

    Sean

    #140855
    irishrunner16
    Participant

    Sorry for the additional question…just want to make sure that I have a firm grasp of when TEC pings the Google Geocoding API.

    Is there a list of instances when a request is made to the Google API? I see that 2,500 requests are allowed in a 24 hour period, which would still be more than enough in our case for the creation of the venue coordinates. Does TEC also make requests to Google anytime a user uses the map view or location search via the events bar? We have about 2.5 million Page Views/month, so that’d make a big difference. From what I can tell the location search/map view still returns the correct events even with the Google API reporting OVER_QUERY_LIMIT, so I think I’m in need of a little clarification to better understand what’s causing us to go over the limit.

    #141346
    Barry
    Member

    You have exceeded your daily request quota for this API.

    That would definitely explain it!

    So to answer your question about when a request is made to Google – basically, any time a venue is created or a change in the geoaddress (the _VenueGeoAddress post meta field) is detected it connects in order to update the coordinates. If you do a batch import of a large number of events, then, yep it’s not impossible you’d exceed the free daily limits.

    Does TEC also make requests to Google anytime a user uses the map view or location search via the events bar? We have about 2.5 million Page Views/month, so that’d make a big difference.

    Well, above and beyond queries used to get venue coordinates, a map is of course being embedded on various pages which might be relevant here especially given the high number of page views you’re describing. Typically this is dynamic and not impacted by caching, so you can see how the numbers might add up here.

    We have an account with MapQuest. Given that, is it possible to change the source (from Google to MapQuest) that the geocoordinates are pulled from when an event is submitted/created?

    I’d definitely view that as an advanced customization – the best advice I can really give here is to look at and study the actions and filters used by the existing system. Take a peak at the TribeEventsGeoLoc constructor (in events-calendar-pro/lib/tribe-geoloc.class.php) – you can build up a picture of how and when it queries Google for geodata.

    Potentially, you could remove all of those callbacks and replace them with your own in a system geared toward integrating with MapQuest.

    I hope that helps – and good luck 🙂

    #141648
    irishrunner16
    Participant

    Ok thanks very much Barry. I’ll take a look at that and will likely need to have our devs dig into the constructor to integrate it with MapQuest.

    I just want to thank you again for helping get to the bottom of this issue. I was not aware of the limits for Google’s Geocoding API. If not for your geofetch test, I’d probably still be pulling my hair out trying to figure out why the coordinates weren’t always being created! So, thanks again for all of your help. You guys rock and have some of the best customer service around!

    Sean

    #142032
    Barry
    Member

    Only too happy help – best we could in the circumstances at least – and I wish you luck with your endeavours re MapQuest 🙂

    I’ll go ahead and close this thread, as ever please don’t hesitate to create new threads as needed if anything else crops up.

Viewing 6 posts - 16 through 21 (of 21 total)
  • The topic ‘Events missing VenueLat and VenueLng meta_key values’ is closed to new replies.