Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Draw line between hundreds of map locations(Lat,Long)

 
Alireza Azadi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a project in which i get Latitude and Longitude from GPS Database. Every GPS device at least send 1000 Cordinate(Lat,Long)in a day. Well, i can get Locations from DB now, and show them in Google Maps, with marker. But now, i want to draw line between them.From the first to end. I pass all Latitudes and Longitudes from my arrays.( As you will see ) What is common way to do this? And also well performance.(Because it has lots of locations) Any help will appreciate. Here is my main Map Activity. Some details in comments.


Notice that i also searched google, but no luck. Any Link? or sample? and solution?

 
Alireza Azadi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved this.
I made an ArrayList of ArrayList<LatLng>.
Ok.
And add every LatLng to this Array.
And then used PolylineOptions Like this :
My `onMapReady` goes like this :

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic