private LatLngBounds getLatLngBounds(List<LatLonPoint> coordin) { LatLngBounds.Builder b = LatLngBounds.builder(); for (int i = 0; i < coordin.size(); i++) { b.include(new LatLng(coordin.get(i).getLatitude(), coordin.get(i) .getLongitude())); } return b.build(); }
@Override protected LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); b.include(new LatLng(startPoint.latitude, startPoint.longitude)); b.include(new LatLng(endPoint.latitude, endPoint.longitude)); if (this.throughPointList != null && this.throughPointList.size() > 0) { for (int i = 0; i < this.throughPointList.size(); i++) { b.include(new LatLng( this.throughPointList.get(i).getLatitude(), this.throughPointList.get(i).getLongitude())); } } return b.build(); }
b.include(points.get(i)); LatLngBounds bounds = b.build(); aMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100));
private void drawFence(GeoFence fence) { switch (fence.getType()) { case GeoFence.TYPE_ROUND : case GeoFence.TYPE_AMAPPOI : drawCircle(fence); break; case GeoFence.TYPE_POLYGON : case GeoFence.TYPE_DISTRICT : drawPolygon(fence); break; default : break; } // 设置所有maker显示在当前可视区域地图中 LatLngBounds bounds = boundsBuilder.build(); mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 150)); polygonPoints.clear(); removeMarkers(); }
private void drawFence(GeoFence fence) { switch (fence.getType()) { case GeoFence.TYPE_ROUND : case GeoFence.TYPE_AMAPPOI : drawCircle(fence); break; case GeoFence.TYPE_POLYGON : case GeoFence.TYPE_DISTRICT : drawPolygon(fence); break; default : break; } // 设置所有maker显示在当前可视区域地图中 LatLngBounds bounds = boundsBuilder.build(); mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 150)); polygonPoints.clear(); removeMarkers(); }
private void drawFence(GeoFence fence) { switch (fence.getType()) { case GeoFence.TYPE_ROUND : case GeoFence.TYPE_AMAPPOI : drawCircle(fence); break; case GeoFence.TYPE_POLYGON : case GeoFence.TYPE_DISTRICT : drawPolygon(fence); break; default : break; } // 设置所有maker显示在当前可视区域地图中 LatLngBounds bounds = boundsBuilder.build(); mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 150)); }
private void drawFence(GeoFence fence) { switch (fence.getType()) { case GeoFence.TYPE_ROUND : case GeoFence.TYPE_AMAPPOI : drawCircle(fence); break; case GeoFence.TYPE_POLYGON : case GeoFence.TYPE_DISTRICT : drawPolygon(fence); break; default : break; } // 设置所有maker显示在当前可视区域地图中 LatLngBounds bounds = boundsBuilder.build(); mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 150)); removeMarkers(); }
private void drawFence(GeoFence fence) { switch (fence.getType()) { case GeoFence.TYPE_ROUND : case GeoFence.TYPE_AMAPPOI : drawCircle(fence); break; case GeoFence.TYPE_POLYGON : case GeoFence.TYPE_DISTRICT : drawPolygon(fence); break; default : break; } // 设置所有maker显示在当前可视区域地图中 LatLngBounds bounds = boundsBuilder.build(); mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 150)); }
@Override protected LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); b.include(new LatLng(startPoint.latitude, startPoint.longitude)); b.include(new LatLng(endPoint.latitude, endPoint.longitude)); if (this.throughPointList != null && this.throughPointList.size() > 0) { for (int i = 0; i < this.throughPointList.size(); i++) { b.include(new LatLng( this.throughPointList.get(i).getLatitude(), this.throughPointList.get(i).getLongitude())); } } return b.build(); }
public void setProperCamera(List<LatLng> lists) { Builder builder = LatLngBounds.builder(); if (lists == null || lists.size() == 0) { return; } for (LatLng latlng : lists) { builder.include(latlng); } try { LatLngBounds bounds = builder.build(); mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 20)); } catch (IllegalStateException e) { e.printStackTrace(); } }
@Override public void onAnotherClick(Marker marker, List<ClusterItem> clusterItems) { Toast.makeText(MainActivity.this,">>>>>>>点击了商家聚合点",Toast.LENGTH_SHORT).show(); if(aMap.getCameraPosition().zoom<=18){ LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (ClusterItem clusterItem : clusterItems) { builder.include(clusterItem.getPosition()); } LatLngBounds latLngBounds = builder.build(); aMap.animateCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds,10 )); } } });
private LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); for (int i = 0; i < mPois.size(); i++) { b.include(new LatLng(mPois.get(i).getLatLonPoint().getLatitude(), mPois.get(i).getLatLonPoint().getLongitude())); } return b.build(); }
private LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); for (int i = 0; i < mPois.size(); i++) { b.include(new LatLng(mPois.get(i).getLatLonPoint().getLatitude(), mPois.get(i).getLatLonPoint().getLongitude())); } return b.build(); }
@Override public void onClick(Marker marker, List<ClusterItem> clusterItems) { Toast.makeText(MainActivity.this,">>>>>>>点击了用户聚合点",Toast.LENGTH_SHORT).show(); if(aMap.getCameraPosition().zoom<=18){ LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (ClusterItem clusterItem : clusterItems) { builder.include(clusterItem.getPosition()); } LatLngBounds latLngBounds = builder.build(); aMap.animateCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds,10 )); } } });
protected LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); b.include(new LatLng(startPoint.latitude, startPoint.longitude)); b.include(new LatLng(endPoint.latitude, endPoint.longitude)); return b.build(); } /**
protected LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); b.include(new LatLng(startPoint.latitude, startPoint.longitude)); b.include(new LatLng(endPoint.latitude, endPoint.longitude)); return b.build(); } /**
protected LatLngBounds getLatLngBounds() { LatLngBounds.Builder b = LatLngBounds.builder(); b.include(new LatLng(Lat_A, Lon_A)); b.include(new LatLng(Lat_D, Lon_D)); return b.build(); }