Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 16
  • 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: 16
  • 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 :

 
Get out of my mind! Look! A tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic