예제 #1
0
 public void setOverlayVisibleBounds(VisibleBoundsVO data) {
   if (mOverlays != null && mOverlays.size() > 0) {
     LatLngBounds.Builder builder = LatLngBounds.builder();
     for (int i = 0; i < mOverlays.size(); i++) {
       LatLng item = mOverlays.get(i);
       builder.include(item);
     }
     aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), data.getPadding()));
   }
 }
예제 #2
0
 public void setMarkerVisibleBounds(VisibleBoundsVO data) {
   List<Marker> list = aMap.getMapScreenMarkers();
   if (list != null && list.size() > 0) {
     LatLngBounds.Builder builder = LatLngBounds.builder();
     for (int i = 0; i < list.size(); i++) {
       LatLng item = list.get(i).getPosition();
       builder.include(item);
     }
     aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), data.getPadding()));
   }
 }