Discussion Forums  >  Maps, Device Location, Tracking

Replies: 7    Views: 121

JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
05/13/13 07:02 AM (11 years ago)

Display list of entries sorted by location relavent to user

The simplest way to describe what I'd like to do is to think of a searchable lists of "stores" in a geographic area that is displayed according to distance from the user's current location. I've had a good look through all of the forums here (as I'm keen to do it natively) but I seem to keep getting drawn towards a HTML5 / PHP solution. In any event, I know I'll need a database in order to store the "stores" location details (and other information) but I'd be interested to know if anyone had done something similar. The user would be presented (in its most simple form) a choice of categories (Pet shops, for instance). When the category is chosen, the user's location would be passed to a database which returns, say, the twenty nearest Pet Shops to them. To do this using the location plugin (and have the results displayed on a map) would be straightforward. What I's like is the return of a list where the user cans elect an entry and that find out more about the particular Pet Store. If anyone does have any pointers, I'd be most grateful.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
05/13/13 08:58 AM (11 years ago)
What you need is the server side to return JSON for the menu, and each option of that menu would point to a different pet shop, say, from a HTML document. I think Smug has published one such example, a combination of JSON, PHP on the server and creating app menus on the fly.
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
05/13/13 09:01 AM (11 years ago)
Thanks @Dusko, I'll look into @Smug's example this evening.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
05/13/13 10:46 AM (11 years ago)
And here's a good resource on how to do geopatial queries (find things within a certain distance of your location): https://developers.google.com/maps/articles/geospatial Mark
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
05/13/13 11:08 AM (11 years ago)
Thanks @Dusko, where would I be able to find smug's example?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/13/13 08:33 PM (11 years ago)
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
05/13/13 10:26 PM (11 years ago)
Oh thanks @Niraj! & @Dusko. Very helpful.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
06/03/13 11:26 AM (11 years ago)
@JimmySaver The next meet is tomorrow, if you want to come along.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.