Android increase polyline width by zoom level (Google Maps V2) -
is there way how can automatic increase , decrease width of polyline when zoom in , out on google maps v2?
it looks horrible on newer devices when stays extremely thin. need thin when zoomed out.
save polyline when added map. perform actions on polyline.
example saving polyline arraylist when added map.
polylines = new arraylist<polyline>(); protected void onprogressupdate(polylineoptions... progress) { if (iscancelled()) { return; } if (progress[0] != null) { // add poly line map // save polyline later user if (mmap != null) { polylines.add(mmap.addpolyline(progress[0])); } } }
meanwhile in code act on polyline
polylines.get(0).setwidth(width)
or
for (polyline po: polylines){ po.setwidth(newwidth); }
Comments
Post a Comment