0
当我放大和缩小Google Maps V2时,我可以自动增加和减少折线宽度吗?Android通过缩放级别(Google Maps V2)增加折线宽度
它看起来很可怕,特别是在新设备保持非常薄时。但是当你缩小时,你需要这么瘦。
当我放大和缩小Google Maps V2时,我可以自动增加和减少折线宽度吗?Android通过缩放级别(Google Maps V2)增加折线宽度
它看起来很可怕,特别是在新设备保持非常薄时。但是当你缩小时,你需要这么瘦。
将折线添加到地图时保存。然后在折线上执行操作。
将折线添加到地图时将折线保存到ArrayList的示例。
polylines = new ArrayList<Polyline>();
protected void onProgressUpdate(PolylineOptions... progress) {
if (isCancelled()) {
return;
}
if (progress[0] != null) {
// add the poly line to the map
// save the polyline for later user
if (mMap != null) {
polylines.add(mMap.addPolyline(progress[0]));
}
}
}
同时回到了代码行为的折线
polylines.get(0).setWidth(width)
或
for (Polyline po: polylines){
po.setWidth(newWidth);
}
你在你自己的代码变焦mMap.setOnCameraChangeListener(听众) – danny117 2014-09-10 19:38:00