@Override
 public void onChange(
     MapView view, GeoPoint newCenter, GeoPoint oldCenter, int newZoom, int oldZoom) {
   // Check values
   if ((!newCenter.equals(oldCenter)) && (newZoom != oldZoom)) {
     mHandler.post(mOnMapZoomPan);
   } else if (!newCenter.equals(oldCenter)) {
     mHandler.post(mOnMapPan);
   } else if (newZoom != oldZoom) {
     mHandler.post(mOnMapZoom);
   }
 }
Пример #2
0
 protected void setPointerFromCursor(Cursor c, int zoomLevel) {
   final GeoPoint gp = MapsUtils.getGeoPoint(c);
   if (mCurrentPointer == null || !mCurrentPointer.equals(gp)) {
     setPointer(gp);
     mMapController.setCenter(gp);
     mMapController.setZoom(zoomLevel);
     mCurrentPointer = gp;
   }
 }