public class MapView.Projection extends Object implements IProjection, GeoConstants
EQUATORCIRCUMFENCE, FEET_PER_METER, METERS_PER_NAUTICAL_MILE, METERS_PER_STATUTE_MILE, RADIUS_EARTH_METERS
Modifier and Type | Method and Description |
---|---|
android.graphics.Point |
fromMapPixels(int x,
int y,
android.graphics.Point reuse) |
IGeoPoint |
fromPixels(float x,
float y)
Converts screen coordinates to the underlying GeoPoint.
|
IGeoPoint |
fromPixels(int x,
int y)
Create a new GeoPoint from pixel coordinates relative to the top-left of the MapView that
provided this PixelConverter.
|
android.graphics.Rect |
fromPixelsToProjected(android.graphics.Rect in)
Translates a rectangle from screen coordinates to intermediate coordinates.
|
BoundingBoxE6 |
getBoundingBox() |
android.graphics.Point |
getCenterMapTileCoords()
Deprecated.
Use
Point out = TileSystem.PixelXYToTileXY(screenRect.centerX(), screenRect.centerY(), null);
instead. |
android.graphics.Rect |
getIntrinsicScreenRect() |
float |
getMapOrientation() |
IGeoPoint |
getNorthEast()
Get the coordinates of the most north-easterly visible point of the map.
|
android.graphics.Rect |
getScreenRect() |
IGeoPoint |
getSouthWest()
Get the coordinates of the most south-westerly visible point of the map.
|
int |
getTileSizePixels()
Deprecated.
Use TileSystem.getTileSize() instead.
|
android.graphics.Point |
getUpperLeftCornerOfCenterMapTile()
Deprecated.
Use
final Point out = TileSystem.TileXYToPixelXY(centerMapTileCoords.x, centerMapTileCoords.y, null);
instead. |
int |
getZoomLevel() |
float |
metersToEquatorPixels(float meters)
Converts a distance in meters (along the equator) to one in (horizontal) pixels at the
current zoomlevel.
|
android.graphics.Point |
toMapPixels(IGeoPoint in,
android.graphics.Point reuse)
Converts a GeoPoint to its screen coordinates.
|
android.graphics.Point |
toMapPixelsProjected(int latituteE6,
int longitudeE6,
android.graphics.Point reuse)
Performs only the first computationally heavy part of the projection.
|
android.graphics.Point |
toMapPixelsTranslated(android.graphics.Point in,
android.graphics.Point reuse)
Performs the second computationally light part of the projection.
|
android.graphics.Rect |
toPixels(BoundingBoxE6 pBoundingBoxE6) |
android.graphics.Point |
toPixels(IGeoPoint in,
android.graphics.Point out)
Converts the given GeoPoint to onscreen pixel coordinates, relative to the top-left of the
MapView that provided this Projection.
|
android.graphics.Point |
toPixels(int tileX,
int tileY,
android.graphics.Point reuse)
Deprecated.
Use TileSystem.TileXYToPixelXY
|
android.graphics.Point |
toPixels(android.graphics.Point tileCoords,
android.graphics.Point reuse)
Deprecated.
Use TileSystem.TileXYToPixelXY
|
public int getZoomLevel()
public BoundingBoxE6 getBoundingBox()
public android.graphics.Rect getScreenRect()
public android.graphics.Rect getIntrinsicScreenRect()
public float getMapOrientation()
@Deprecated public int getTileSizePixels()
@Deprecated public android.graphics.Point getCenterMapTileCoords()
Point out = TileSystem.PixelXYToTileXY(screenRect.centerX(), screenRect.centerY(), null);
instead.@Deprecated public android.graphics.Point getUpperLeftCornerOfCenterMapTile()
final Point out = TileSystem.TileXYToPixelXY(centerMapTileCoords.x, centerMapTileCoords.y, null);
instead.public IGeoPoint fromPixels(float x, float y)
x
- y
- public android.graphics.Point fromMapPixels(int x, int y, android.graphics.Point reuse)
public android.graphics.Point toMapPixels(IGeoPoint in, android.graphics.Point reuse)
in
- the GeoPoint you want the screen coordinates ofreuse
- just pass null if you do not have a Point to be 'recycled'.public android.graphics.Point toMapPixelsProjected(int latituteE6, int longitudeE6, android.graphics.Point reuse)
latituteE6
- the latitute of the pointlongitudeE6
- the longitude of the pointreuse
- just pass null if you do not have a Point to be 'recycled'.public android.graphics.Point toMapPixelsTranslated(android.graphics.Point in, android.graphics.Point reuse)
in
- the Point calculated by the toMapPixelsProjectedreuse
- just pass null if you do not have a Point to be 'recycled'.public android.graphics.Rect fromPixelsToProjected(android.graphics.Rect in)
in
- the rectangle in screen coordinates@Deprecated public android.graphics.Point toPixels(android.graphics.Point tileCoords, android.graphics.Point reuse)
@Deprecated public android.graphics.Point toPixels(int tileX, int tileY, android.graphics.Point reuse)
public android.graphics.Rect toPixels(BoundingBoxE6 pBoundingBoxE6)
public float metersToEquatorPixels(float meters)
IProjection
metersToEquatorPixels
in interface IProjection
meters
- the distance in meterspublic IGeoPoint getNorthEast()
IProjection
getNorthEast
in interface IProjection
public IGeoPoint getSouthWest()
IProjection
getSouthWest
in interface IProjection
public android.graphics.Point toPixels(IGeoPoint in, android.graphics.Point out)
IProjection
toPixels
in interface IProjection
in
- The latitude/longitude pair to convert.out
- A pre-existing object to use for the output; if null, a new Point will be
allocated and returned.public IGeoPoint fromPixels(int x, int y)
IProjection
fromPixels
in interface IProjection
Copyright © 2014. All Rights Reserved.