Cutomize sharetribe search engine

I am using the latest version of sharetribe and I want nearby places listings I went through search code and passed location_longitude and location_latitude to search with radius by seems like radius isn’t working perfectly can anyone tell me how to pass radius correctly?

I am passing like -

search = {
author_id: @person.id,
include_closed: include_closed,
page: 1,
# address: @listing.origin,
location_latitude: @listing.origin_loc.try(:latitude),
location_longitude: @listing.origin_loc.try(:longitude),
radius: 80,
per_page: @per_page
}
Am I passing correctly?
Do I am eligible to pass sorting to this search? I mean the result should be like the closest record would come first.

Please address. if there is any other way also suggest me that too.

1 Like

Hi Ali,

I am also really interested into implementing radius location search!
Please let me know if you find anything :slight_smile:

1 Like

Sure I am working on it :slight_smile:

1 Like

HI,
I am interested to know this too.
Are you changing this in homepage_controller.rb? and Is this working?

Thanks

Not specific to home page though. Actually where ever you want to implement you can do that, Even some other modifications are also required to make it perfect.

Thank you Ali_Hassan_Mirza

I have not started working on this. But will be doing soon. ( currently solving other basic issues while working with EC2 )
Can you please give more details here once your work is done?

Thank you for your time in advance.

Sure, I will give all required details.
Please ping me on skype ali.hassan.mirzaa

I’m interested in doing a radius search too, Ali_Hassan_Mirza did you find a solution?

@NickW
Yes, I found solution let me know if you are interested I will implement for you.

Skype: ali.hassan.mirzaa
Email: ali.hassan.mirzaa@gmail.com