geolocation

Home Forums Calendar Products Events Calendar PRO geolocation

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #791370
    jrtoy4311
    Participant

    OK so I got a near me script working for both list and map views:
    SCRIPT:
    function showLocation(position) {
    var latitude = position.coords.latitude;
    var longitude = position.coords.longitude;
    window.location.href =”http://www.wcspulse.com/events/?action=tribe_list&tribe_paged=1&tribe-bar-geoloc-lat=”+ position.coords.latitude +”&tribe-bar-geoloc-lng=”+ position.coords.longitude;
    }

    function errorHandler(err) {
    if(err.code == 1) {
    alert(“Error: Access is denied!”);
    }else if( err.code == 2) {
    alert(“Error: Position is unavailable!”);
    }
    }
    function getLocation(){

    if(navigator.geolocation){
    // timeout at 60000 milliseconds (60 seconds)
    var options = {timeout:60000};
    navigator.geolocation.getCurrentPosition(showLocation,
    errorHandler,
    options);
    }else{
    alert(“Sorry, browser does not support geolocation!”);
    }
    }
    getLocation()

    Looks like the month view requires an — “&tribe-bar-geoloc=ny” (if searching in ny) more than just the lat and long coordinates. any tricks around this?

    #792059
    Barry
    Member

    Nice work 🙂

    Looks like the month view requires an — “&tribe-bar-geoloc=ny” (if searching in ny) more than just the lat and long coordinates. any tricks around this?

    How about adding the tribe-bar-geoloc parameter to the URL query, but without any value (ie, just “…&tribe-bar-geoloc”) – would that work for you?

     

    #792855
    jrtoy4311
    Participant

    unfortunately that does not work, it still shows ALL events.

    #793443
    Barry
    Member

    You’re right, I do apologise – I missed that you noted the problem takes place in month view. In map view, on the other hand, that trick seems to work.

    It’s possible this is actually a bug on our side as, unless I’m mistaken, even providing a geographic name fails if you load the URL directly (as opposed to entering the name in the location field and hitting Find Events).

    Ideally, of course, you could take such a URL and re-use it (or even ‘manually’ craft it as you are doing) and it would work.

    With that in mind I’ll get this logged for further attention … in the meantime I’m not sure how else you might workaround this, unfortunately.

    #794507
    jrtoy4311
    Participant

    Yes that’s the biggest problem is even after I get the URL, reusing the url does not work. Thanks for looking into it and hopefully I’ll see it fixed in your next update!

    #794618
    Barry
    Member

    Definitely – thank you for taking the time to draw this to our attention 🙂

    I’ve pinned the bug report to this thread so as soon as we’ve got some progress to report we’ll do our best to pop back, re-open the thread and let you know how things are going.

    Thanks again (and, for the time being, I’ll close this thread).

    #909546
    Leah
    Member

    Hi there,

    I wanted to post here and update you. Although we weren’t able to get a fix for the issue your reported into our upcoming 3.9 release, it is still on our list to get corrected. Thank you for reporting the problem, and for your patience and support while we get a solid fix in place. We’ll update you when a solution is ready to go.

    Best,
    Leah

    #966707
    Leah
    Member

    Hi there,

    Thank you for your support and patience while we worked on this issue. We are happy announce that we have incorporated a fix into our upcoming 3.10 release. Keep an eye out for a release announcement on our site and for updates available on your WordPress dashboard.

    While we have thoroughly tested this release and are confident of its quality, it is impossible to account for every edge case in the wide world of WordPress. If you run into trouble with the new version or you don’t see your reported issue corrected, please start a new thread and we will be happy to work with you.

    Thanks again for your patience here. We’re excited to get this version out the door and into your hands!

    Best,
    The Events Calendar Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘geolocation’ is closed to new replies.