The following
1. The current position is jining, the client transfer the current latitude and longitude and the current number and city number, start screening of merchants, from jining region to other parts of the merchants, the list is sorted by distance from near to far (database merchants also have latitude and longitude, city code, area code, get the client pass the longitude and latitude and merchants in the database of longitude and latitude calculated distance, sorting from near to far)
2. Jining, here are qufu, jinxiang, and so on region
3. The switch switch area now, qufu
4. The client to pass on scripture latitude is changeless, qufu area code, city code is still jining
5. According to the area code first find merchants qufu all merchants in the table, according to the longitude and latitude to calculate distance, from near to far, followed by screening in other parts of the merchants, according to the longitude and latitude calculation, from near to far sorting, list followed by qufu merchants, in other parts of the merchants
CodePudding user response:
Latitude and longitude nearly, it must be the most appropriate, not to consider the traffic problem?CodePudding user response: