JSON API to search near by venues ?

This topic contains 5 replies, has 3 voices, and was last updated by  Kangaroo 6 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #381638

    Kangaroo
    Free User
    Post count: 11

    I am working on an android app to search for nearby venues. Is it possible to search the directory through JSON API using the users GPS coordinates ?

    #381778

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have assigned this to the dev who is building the API, he will reply tomorrow.

    Thanks,

    Stiofan

    #381859

    Kiran
    Moderator
    Post count: 7069

    Hi There,

    We have added feature so now results can be filtered by latitude & longitude.

    You can use following parameters:
    latitude – Filter by latitude
    longitude – Filter by longitude
    sort_by – nearest or farthest. Optional.
    sdist – Near me range. Optional. One of value from GD custom fields search settings. If not passed default value taken from setting.

    This will be available in next release of GD API plugin.
    Download development version from here https://github.com/kprajapatii/geodir_api/ in case you want to test it now.

    Thanks,
    Kiran

    #382039

    Kangaroo
    Free User
    Post count: 11

    Hello Kiran,

    Thank you for your reply 🙂

    Unfortunately, I am not sure how to use the API. I don’t need to filter venue based on latitude
    and longitude, I need to search for nearby venues using latitude, longitude and venue category.

    for example = http://www.sitename.com/lat=31.943&lng=124.535&category=restaurants

    I am very impressed by the Geo Directory themes and I am ready to purchase the membership.However the JSON api is a major component for my Android app and I just need to confirm if that’s going to work now or in near future.

    Thanks 🙂

    #382051

    Kiran
    Moderator
    Post count: 7069

    Hi,

    To search for nearby venues using latitude, longitude and venue category. Use following endpoint.

    http://sitename.com/wp-json/geodir/v1/places/?latitude=31.943&longitude=124.535&gd_placecategory=6
    Where 6 is category id.

    Use &sort_by=nearest to filter results by nearest.
    Use &sdist=40 to filter results within certain range.

    We are improving GeoDirectory API to make it more efficient & user friendly 🙂

    Thanks,
    Kiran

    #382065

    Kangaroo
    Free User
    Post count: 11

    Thanks a lot. I will try it out tomorrow.

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket