public class Projection extends Object implements IProjection, MapViewConstants
Modifier and Type | Field and Description |
---|---|
protected float |
mMultiTouchScale |
protected int |
mOffsetX |
protected int |
mOffsetY |
ANIMATION_DURATION_DEFAULT, ANIMATION_DURATION_LONG, ANIMATION_DURATION_SHORT, ANIMATION_SMOOTHNESS_DEFAULT, ANIMATION_SMOOTHNESS_HIGH, ANIMATION_SMOOTHNESS_LOW, DEBUGMODE, MINIMUM_ZOOMLEVEL, NOT_SET
Modifier and Type | Method and Description |
---|---|
protected android.graphics.Point |
adjustForDateLine(int x,
int y,
android.graphics.Point reuse) |
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.
|
IGeoPoint |
fromPixels(int x,
int y,
GeoPoint reuse) |
BoundingBoxE6 |
getBoundingBox() |
android.graphics.Rect |
getIntrinsicScreenRect() |
android.graphics.Matrix |
getInvertedScaleRotateCanvasMatrix()
This will provide a Matrix that will revert the current map's scaling and rotation.
|
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 |
getZoomLevel() |
float |
metersToEquatorPixels(float meters)
Converts a distance in meters (along the equator) to one in (horizontal) pixels at the
current zoomlevel.
|
float |
metersToPixels(float meters)
Converts a distance in meters to one in (horizontal) pixels at the current zoomlevel and at
the current latitude at the center of the screen.
|
android.graphics.Point |
rotateAndScalePoint(int x,
int y,
android.graphics.Point reuse)
This will apply the current map's scaling and rotation for a point.
|
android.graphics.Point |
toMercatorPixels(int x,
int y,
android.graphics.Point reuse) |
android.graphics.Point |
toPixels(IGeoPoint in,
android.graphics.Point reuse)
|
android.graphics.Point |
toPixelsFromMercator(int x,
int y,
android.graphics.Point reuse) |
android.graphics.Point |
toPixelsFromProjected(android.graphics.Point in,
android.graphics.Point reuse)
Performs the second computationally light part of the projection.
|
android.graphics.Point |
toProjectedPixels(GeoPoint geoPoint,
android.graphics.Point reuse)
A wrapper for
toProjectedPixels(int, int, Point) |
android.graphics.Point |
toProjectedPixels(int latituteE6,
int longitudeE6,
android.graphics.Point reuse)
Performs only the first computationally heavy part of the projection.
|
android.graphics.Point |
unrotateAndScalePoint(int x,
int y,
android.graphics.Point reuse)
This will revert the current map's scaling and rotation for a point.
|
protected final int mOffsetX
protected final int mOffsetY
protected final float mMultiTouchScale
public int getZoomLevel()
public BoundingBoxE6 getBoundingBox()
public android.graphics.Rect getScreenRect()
public android.graphics.Rect getIntrinsicScreenRect()
public float getMapOrientation()
public IGeoPoint fromPixels(int x, int y)
IProjection
fromPixels
in interface IProjection
public android.graphics.Point toPixels(IGeoPoint in, android.graphics.Point reuse)
IProjection
IGeoPoint
to onscreen pixel coordinates, relative to the top-left
of the MapView
that provided this Projection.toPixels
in interface IProjection
in
- The latitude/longitude pair to convert.reuse
- A pre-existing object to use for the output; if null, a new Point will be
allocated and returned.protected android.graphics.Point adjustForDateLine(int x, int y, android.graphics.Point reuse)
public android.graphics.Point toProjectedPixels(GeoPoint geoPoint, android.graphics.Point reuse)
toProjectedPixels(int, int, Point)
public android.graphics.Point toProjectedPixels(int latituteE6, int longitudeE6, android.graphics.Point reuse)
toPixelsFromProjected(Point, Point)
to get the final position.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 toPixelsFromProjected(android.graphics.Point in, android.graphics.Point reuse)
in
- the Point calculated by the toProjectedPixels(int, int, Point)
reuse
- just pass null if you do not have a Point to be 'recycled'.toProjectedPixels(int, int, Point)
.public android.graphics.Point toPixelsFromMercator(int x, int y, android.graphics.Point reuse)
public android.graphics.Point toMercatorPixels(int x, int y, android.graphics.Point reuse)
public float metersToEquatorPixels(float meters)
IProjection
metersToEquatorPixels
in interface IProjection
meters
- the distance in meterspublic float metersToPixels(float meters)
meters
- the distance in meterspublic IGeoPoint getNorthEast()
IProjection
getNorthEast
in interface IProjection
public IGeoPoint getSouthWest()
IProjection
getSouthWest
in interface IProjection
public android.graphics.Matrix getInvertedScaleRotateCanvasMatrix()
public android.graphics.Point unrotateAndScalePoint(int x, int y, android.graphics.Point reuse)
public android.graphics.Point rotateAndScalePoint(int x, int y, android.graphics.Point reuse)
Copyright © 2015. All Rights Reserved.