Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.map.client
Interface Projection

All Known Subinterfaces:
  WmsProjection

All Known Implementing Classes:
  AbstractProjection, Epsg4326Projection, Mapa.IcsProjection, MercatorProjection, Osgeo41001Projection, OsmMercatorProjection, ScaleProjection

    public interface Projection

A projection maps between latitude-longitude coordinates and pixel coordinates (at a certain zoom).

Author:
  Maryanovsky Alexander

Method Summary
`Point` | `fromLatLngToPixel(LatLng latLng, int zoom)` Returns the pixel coordinates corresponding to the specified latitude-longitude coordinates at the specified zoom.
`LatLng` | `fromPixelToLatLng(PointView pixel, int zoom)` Returns the latitude-longitude coordinates corresponding to the specified pixel coordinates at the specified zoom.
`SizeView` | `getWrapSize(int zoom)` Returns the number of pixels after which the map wraps around the earth on each axis at the specified zoom.
`double` | `getZoomMagnification(int startZoom, int endZoom)` Returns the magnification coefficient between the two specified zooms, i.e.

Method Detail

### fromLatLngToPixel

    Point fromLatLngToPixel(LatLng latLng,
                            int zoom)

  Returns the pixel coordinates corresponding to the specified latitude-longitude coordinates at the specified zoom.

### fromPixelToLatLng

    LatLng fromPixelToLatLng(PointView pixel,
                             int zoom)

  Returns the latitude-longitude coordinates corresponding to the specified pixel coordinates at the specified zoom. This method should always return a legal value, even if the pixel coordinates fall outside the map. In such a case, the projection may, for example, choose to return the closest legal location or wrap around.

### getWrapSize

    SizeView getWrapSize(int zoom)

  Returns the number of pixels after which the map wraps around the earth on each axis at the specified zoom. A value of 0 indicates that the map does not repeat itself.

### getZoomMagnification

    double getZoomMagnification(int startZoom,
                                int endZoom)

  Returns the magnification coefficient between the two specified zooms, i.e. how much the map is magnified when the zoom is changed from `startZoom` to `endZoom`. This would normally be a value larger than 1 if `endZoom` is larger than `startZoom` and vice versa.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD