Java – spring data – mongodb finds the nearest location around the route
•
Java
I have a model that contains geojson points It is easy to find the closest spring data, but how to retrieve the nearest position of a given route?
I get route information from Google:
http://maps.googleapis.com/maps/api/directions/xml?origin=48.208174 ,16.717540&sensor=false&units=metric&mode=driving
Solution
The Google mapping API returns the "step" of the route, which has the coordinates of the edge of the segment
Open the street map database to provide route coordinate information. You can use it to supplement your data Get exact geo coordinates along an entire route, Google maps or OpenStreetMap
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码