Package 

Interface IProjection

    • Method Summary

      Modifier and Type Method Description
      abstract Point toPixels(IGeoPoint in, Point out) Converts the given IGeoPoint to onscreen pixel coordinates, relative to the top-leftof the org.osmdroid.views.MapView that provided this Projection.
      abstract IGeoPoint fromPixels(int x, int y) Create a new GeoPoint from pixel coordinates relative to the top-left of the MapView thatprovided this PixelConverter.
      abstract float metersToEquatorPixels(float meters) Converts a distance in meters (along the equator) to one in (horizontal) pixels at thecurrent zoomlevel.
      abstract IGeoPoint getNorthEast() Get the coordinates of the most north-easterly visible point of the map.
      abstract IGeoPoint getSouthWest() Get the coordinates of the most south-westerly visible point of the map.
      • Methods inherited from class java.lang.Object

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

      • toPixels

         abstract Point toPixels(IGeoPoint in, Point out)

        Converts the given IGeoPoint to onscreen pixel coordinates, relative to the top-leftof the org.osmdroid.views.MapView that provided this Projection.

        Parameters:
        in - The latitude/longitude pair to convert.
        out - A pre-existing object to use for the output; if null, a new Point will beallocated and returned.
      • fromPixels

         abstract IGeoPoint fromPixels(int x, int y)

        Create a new GeoPoint from pixel coordinates relative to the top-left of the MapView thatprovided this PixelConverter.

      • metersToEquatorPixels

         abstract float metersToEquatorPixels(float meters)

        Converts a distance in meters (along the equator) to one in (horizontal) pixels at thecurrent zoomlevel. In the default Mercator projection, the actual number of pixels for agiven distance will get higher as you move away from the equator.

        Parameters:
        meters - the distance in meters
      • getNorthEast

         abstract IGeoPoint getNorthEast()

        Get the coordinates of the most north-easterly visible point of the map.

      • getSouthWest

         abstract IGeoPoint getSouthWest()

        Get the coordinates of the most south-westerly visible point of the map.