Android needs to display the number of merchants in the vicinity, and how to design coordinates for php databases

Source: Internet
Author: User
Tags php database
Android requires nearby merchants to display, how many meters of businesses are displayed, how to design coordinates for php database android requires nearby merchants to display, how many meters of businesses are displayed, and how to design coordinates for php database


Reply to discussion (solution)

At least two fields, longitude and latitude, are required ~ Then, you can use php or java to calculate the longitude and latitude of a certain point. the largest and smallest longitude and latitude of the center xx meters are the radius. in this way, you can get the four coordinate points. conditional shops with longitude and latitude, of course, this is the scope of a quadrilateral! It is troublesome to circle!

There are not many sellers in the meter range
But the number of meters the merchant is in.

Although it looks the same, the subject has changed.
The seller is the subject and his position is fixed. he will not move the seller because of your move.
You only need to save the merchant's coordinates.

This field exists in the child mysql itself.

Record the longitude and latitude of each seller.

Then calculate the distance between the current location and each seller

Create a distance calculation function in mysql to query it using SQL statements.

Record the longitude and latitude of each seller.

Then calculate the distance between the current location and each seller

Create a distance calculation function in mysql to query it using SQL statements.

Are there such functions? Ask for advice

How does Android display sellers around it?

I am using the method on the first floor. the circle needs to compare the distance. This distance is more complicated than this estimate. Hope to have a good share

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.