Package 

Class MapController

    • Method Summary

      Modifier and Type Method Description
      void onFirstLayout(View v, int left, int top, int right, int bottom) this generally means that the map is ready to go
      void zoomToSpan(double latSpan, double lonSpan)
      void zoomToSpan(int latSpanE6, int lonSpanE6)
      void animateTo(IGeoPoint point) Start animating the map towards the given point.
      void animateTo(IGeoPoint point, Double pZoom, Long pSpeed, Float pOrientation)
      void animateTo(IGeoPoint point, Double pZoom, Long pSpeed, Float pOrientation, Boolean pClockwise)
      void animateTo(IGeoPoint pPoint, Double pZoom, Long pSpeed)
      void animateTo(int x, int y) Start animating the map towards the given point.
      void scrollBy(int x, int y)
      void setCenter(IGeoPoint point) Set the map view to the given center.
      void stopPanning()
      void stopAnimation(boolean jumpToTarget) Stops a running animation.
      int setZoom(int zoomlevel)
      double setZoom(double pZoomlevel)
      boolean zoomIn() Zoom in by one zoom level.
      boolean zoomIn(Long animationSpeed) zooms in 1 whole map zoom level with an adjustable zoom in animation speed
      boolean zoomInFixing(int xPixel, int yPixel, Long zoomAnimation)
      boolean zoomInFixing(int xPixel, int yPixel) zooms in and centers the map to the given canvas coordinates
      boolean zoomOut(Long animationSpeed) zooms out 1 whole map zoom level with adjustable zoom speed
      boolean zoomOut() Zoom out by one zoom level.
      boolean zoomOutFixing(int xPixel, int yPixel) zooms out while centering the map canvas coordinates
      boolean zoomTo(int zoomLevel) zooms to the given zoom level (whole number) and animates the zoom motion
      boolean zoomTo(int zoomLevel, Long animationSpeed)
      boolean zoomToFixing(int zoomLevel, int xPixel, int yPixel, Long zoomAnimationSpeed)
      boolean zoomTo(double pZoomLevel, Long animationSpeed)
      boolean zoomTo(double pZoomLevel) zooms to the given zoom level
      boolean zoomToFixing(double zoomLevel, int xPixel, int yPixel, Long zoomAnimationSpeed)
      boolean zoomToFixing(double zoomLevel, int xPixel, int yPixel)
      boolean zoomToFixing(int zoomLevel, int xPixel, int yPixel)
      • Methods inherited from class org.osmdroid.api.IMapController

        animateTo, animateTo, setCenter, setZoom, setZoom, stopAnimation, zoomInFixing, zoomInFixing, zoomOutFixing, zoomTo, zoomToFixing
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapController

        MapController(MapView mapView)
    • Method Detail

      • onFirstLayout

         void onFirstLayout(View v, int left, int top, int right, int bottom)

        this generally means that the map is ready to go

      • zoomToSpan

         void zoomToSpan(double latSpan, double lonSpan)
      • zoomToSpan

         void zoomToSpan(int latSpanE6, int lonSpanE6)
      • animateTo

         void animateTo(IGeoPoint point)

        Start animating the map towards the given point.

      • animateTo

         void animateTo(int x, int y)

        Start animating the map towards the given point.

      • scrollBy

         void scrollBy(int x, int y)
      • setCenter

         void setCenter(IGeoPoint point)

        Set the map view to the given center. There will be no animation.

      • stopAnimation

         void stopAnimation(boolean jumpToTarget)

        Stops a running animation.

      • setZoom

         int setZoom(int zoomlevel)
      • setZoom

         double setZoom(double pZoomlevel)
      • zoomIn

         boolean zoomIn()

        Zoom in by one zoom level.

      • zoomIn

         boolean zoomIn(Long animationSpeed)

        zooms in 1 whole map zoom level with an adjustable zoom in animation speed

        Parameters:
        animationSpeed - in ms, if null the default is used
      • zoomInFixing

         boolean zoomInFixing(int xPixel, int yPixel, Long zoomAnimation)
        Parameters:
        zoomAnimation - if null, the default is used
      • zoomInFixing

         boolean zoomInFixing(int xPixel, int yPixel)

        zooms in and centers the map to the given canvas coordinates

      • zoomOut

         boolean zoomOut(Long animationSpeed)

        zooms out 1 whole map zoom level with adjustable zoom speed

        Parameters:
        animationSpeed - in ms, if null the default is used
      • zoomOut

         boolean zoomOut()

        Zoom out by one zoom level.

      • zoomOutFixing

        @Deprecated() boolean zoomOutFixing(int xPixel, int yPixel)

        zooms out while centering the map canvas coordinates

      • zoomTo

         boolean zoomTo(int zoomLevel)

        zooms to the given zoom level (whole number) and animates the zoom motion

        Parameters:
        zoomLevel - 0-Max zoom of the current map tile source, typically 22 or less
      • zoomTo

         boolean zoomTo(int zoomLevel, Long animationSpeed)
      • zoomToFixing

         boolean zoomToFixing(int zoomLevel, int xPixel, int yPixel, Long zoomAnimationSpeed)
        Parameters:
        zoomAnimationSpeed - time in milliseconds, if null, the default settings will be used
      • zoomTo

         boolean zoomTo(double pZoomLevel, Long animationSpeed)
      • zoomTo

         boolean zoomTo(double pZoomLevel)

        zooms to the given zoom level

        Parameters:
        pZoomLevel - any real number between 0 and max zoom of the current tile source, typically 22 or less
      • zoomToFixing

         boolean zoomToFixing(double zoomLevel, int xPixel, int yPixel, Long zoomAnimationSpeed)
      • zoomToFixing

         boolean zoomToFixing(double zoomLevel, int xPixel, int yPixel)
      • zoomToFixing

         boolean zoomToFixing(int zoomLevel, int xPixel, int yPixel)