Home  >  Article  >  Backend Development  >  javascript - How to retain unique coordinates within a range

javascript - How to retain unique coordinates within a range

WBOY
WBOYOriginal
2016-08-08 09:06:49871browse

1. The current need is to draw a map trajectory, but there are many coordinate points and the drawn trajectory is very messy. Please give me a way to keep one coordinate within the range. Is this easy to implement? Does PHP provide data, filter it at the interface output, or does it process and draw it when Android accepts it?
Or positioning based on these coordinates and nearby landmark buildings? ? How to achieve this?

Reply content:

1. The current need is to draw a map trajectory, but there are many coordinate points and the drawn trajectory is very messy. Please give me a way to keep one coordinate within the range. Is this easy to implement? Does PHP provide data, filter it at the interface output, or does it process and draw it when Android accepts it?

Or positioning based on these coordinates and nearby landmark buildings? ? How to achieve this?

1. Select a point a

2. Delete the points within a certain range around a

3. Select the nearest point b outside a certain range of a
4. a = b, jump to 2

I think this should be returned to the client for drawing after interface filtering. This is originally a data problem and should be handled on the server side.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:¤tDateNext article:¤tDate