I want make an application in android in which user can input two geo points(lat and long) and with these two points i want to make query in database table(mysql) where already peoples information stored with their gps location(lat and long) where by using the above query i want to search people between inputted starting and ending point.
For example : User A has inputted starting point : Delhi and Ending point : Mumbai and now he will click on the search button and all peoples comes whose gps location between mumbai and delhi. If is it posible. All peole will displays as listview.
hope i have explained well as you understand..
Please somebody tell me the way how can i achieve this ? i m using php mysql as backend.
If you want to know who is in the square area delimited by two points you must check whether the position of the people is between both points’ latitude and longitude. Example:
If you want to calculate distances, you can rely on the Great Circle Formula. This could be used in order to find people in an X-miles radius or so.