Page 2 of 2

Gecoding - Find nearest 3 based on lat long held in database.

Posted: Wed Jan 28, 2015 9:26 pm
by Ian Usher7109531

Hi Yurii,

What i want to do now is use the geolocation service to decide what lat and long should be queried. For example within the attached picture, i want to be able to use the Latitude and Longitude from the geolocation service rather than having to enter one in. Again hope this makes sense, its the last bit that im really struggling with currently! :)

Image


Gecoding - Find nearest 3 based on lat long held in database.

Posted: Thu Jan 29, 2015 8:44 pm
by Illya Stepanov

Hi -

Yes. You will need to fill data from geolocation service in the nearSphear parameter, cause DB doesn't know about your currentLat and currLong parameters.


Gecoding - Find nearest 3 based on lat long held in database.

Posted: Thu Jan 29, 2015 8:50 pm
by Ian Usher7109531

Thanks illya,

How do i reference these? Is it a standard currentlat and currentlong that is used, or is it something i specify? If it is something i specify, where and how can i do this? Could you provide a basic example or screenshot of how to do this please?

Many thanks,

Ian


Gecoding - Find nearest 3 based on lat long held in database.

Posted: Sat Jan 31, 2015 6:54 pm
by Alena Prykhodko

Ian,

Map corresponding field to nearSphear parameter http://devcenter.appery.io/documentat....

[quote:]Is it a standard currentlat and currentlong that is used, or is it something i specify?[/quote]
Please clarify this question. As I can see these are yours defined parameters.


Gecoding - Find nearest 3 based on lat long held in database.

Posted: Sat Jan 31, 2015 8:07 pm
by Ian Usher7109531

Ok...so at the minute when this service runs...it uses my parameter that ive set.

What i want to do is use the geolocation service Coordinates rather than a set that i have defined.

So when the geolocation is run i want the coordinates from the geolocation service to be used, rather than the ones that i have defined In the query.

Does that clarify the question?


Gecoding - Find nearest 3 based on lat long held in database.

Posted: Tue Feb 03, 2015 11:49 am
by Evgene Karachevtsev

Hello Ian,

We are very sorry for the radio silence here.
You should change your where parameter upon calling your service:
1) please go to the page
2) open the before mapping
3) add js there
prereturn "{'Geolocation':{ '$nearSphere':[" + currLat + "," + currLong + "]}}"/pre


Gecoding - Find nearest 3 based on lat long held in database.

Posted: Sat Feb 07, 2015 9:19 pm
by Ian Usher7109531

Hi Evgene/Yurii,

I have finally managed to get this working. I appreciated your assistance (and persistence) with this.

Many thanks,

Ian