Add Path in Android GPS
How do I add a path betweeen several points defined by the gps in androi开发者_开发百科d?
What you want is a MapActivity. The GPS module can be used to set several points on that Map, and with the Google Maps API, you can create a Route between those points.
One thing about the maps api is that you can give it two points and it can calculate a route to this location. Using JSON you can send a request with your two points and then get a collection of points in the return JSON object.
In particular, you can take this object and decode the lat/lng of these points and then assign them accordingly and plot them on the map and then draw a line using some canvas painting. Also another thing is you can do a direct call to the Google Maps app and pass in information in the intent so that it can display the points to those particular points.
So.. in short, you have two options.
精彩评论