Saturday, August 3, 2013

[android-developers] A list of coordinates should be shown in GoogleMaps

Hi everyone,
I am having the following problem with my program.
I am able to show a polygon, but now I have a lot of coordinates to be shown.
Since, I do not want to write the following line ( new LatLng(...) ) again and again I am trying to find a way to make it more easier.

Polygon polygon = googleMap.addPolygon(new PolygonOptions()
.add(new LatLng(48.213947, 16.370101), new LatLng(48.214584,16.369249), new LatLng(48.215192,16.370545), new LatLng(48.214545,16.371264)) <-- I do now want to write this line again and again for more than 10.000 points
.strokeColor(Color.RED)
.fillColor(Color.BLUE));

I thought about an double array, but I could find a way to fill it out correctly ( new LatLng(... ...) ).

Maybe someone could help me please, or do I have it to do in another way?

Thank you very much!

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment