public class Projection extends java.lang.Object implements IProjection, MapViewConstants
ANIMATION_DURATION_DEFAULT, ANIMATION_DURATION_LONG, ANIMATION_DURATION_SHORT, ANIMATION_SMOOTHNESS_DEFAULT, ANIMATION_SMOOTHNESS_HIGH, ANIMATION_SMOOTHNESS_LOW, DEBUGMODE, MINIMUM_ZOOMLEVEL, NOT_SET
限定符和类型 | 方法和说明 |
---|---|
IGeoPoint |
fromPixels(int x,
int y)
相对于mapView的屏幕像素点位信息解析成一个的IGeoPoint对象并返回.
|
IGeoPoint |
fromPixels(int x,
int y,
GeoPoint reuse)
屏幕坐标转化成地图坐标
|
BoundingBoxE6 |
getBoundingBox()
获取经纬度信息
|
Rect |
getIntrinsicScreenRect()
获取内部屏幕投影服务Rect
|
Matrix |
getInvertedScaleRotateCanvasMatrix()
提供一个固定的Matrix,恢复地图的缩放和旋转功能,适用于在屏幕固定位置绘制地图
|
float |
getMapOrientation()
获取地图方向
|
IGeoPoint |
getNorthEast()
获取到地图最north-easterly的点位信息.
|
Rect |
getScreenRect()
获取屏幕投影服务Rect
|
IGeoPoint |
getSouthWest()
获取地图上最 south-westerly 的点位信息.
|
int |
getZoomLevel()
zoom级别
|
float |
metersToEquatorPixels(float meters)
在当前的ZOOM级别范围中,将米(沿赤道)转换成一个水平的像素距离
|
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.
|
Point |
rotateAndScalePoint(int x,
int y,
Point reuse)
有转向角度和缩放时绘制固定点位转换point方法
|
Point |
toMercatorPixels(int x,
int y,
Point reuse)
屏幕左边转化为莫斯卡投影对应的point
|
Point |
toPixels(IGeoPoint in,
Point reuse)
|
Point |
toPixelsFromMercator(int x,
int y,
Point reuse)
从莫斯卡投影中获取point
|
Point |
toPixelsFromProjected(Point in,
Point reuse)
执行第二次投影部分的计算
|
Point |
toProjectedPixels(GeoPoint geoPoint,
Point reuse)
对toProjectedPixels的封装
|
Point |
toProjectedPixels(int latituteE6,
int longitudeE6,
Point reuse)
经纬度转化成屏幕point
|
Point |
unrotateAndScalePoint(int x,
int y,
Point reuse)
有转向角度是绘制固定点位转换point方法
|
public int getZoomLevel()
public BoundingBoxE6 getBoundingBox()
public Rect getScreenRect()
public Rect getIntrinsicScreenRect()
public float getMapOrientation()
public IGeoPoint fromPixels(int x, int y)
IProjection
fromPixels
在接口中 IProjection
public IGeoPoint fromPixels(int x, int y, GeoPoint reuse)
x
- 屏幕X坐标y
- 屏幕Y坐标reuse
- 一个可选的点被回收,或为空,则自动创建一个新的public Point toPixels(IGeoPoint in, Point reuse)
IProjection
toPixels
在接口中 IProjection
in
- 包含经纬度信息model.reuse
- 一个已经存在的点位对象;如果为空则返回一个new对象.public Point toProjectedPixels(GeoPoint geoPoint, Point reuse)
geoPoint
- 经纬度封装对象reuse
- 如果没有点位需要回收,只需要传递空值,public Point toProjectedPixels(int latituteE6, int longitudeE6, Point reuse)
latituteE6
- the latitute of the 经纬度longitudeE6
- the longitude of the 经纬度reuse
- 如果没有点位需要回收,只需要传递空值,public Point toPixelsFromProjected(Point in, Point reuse)
in
- 从toProjectedPixels(int, int, Point)计算出的点reuse
- 如果没有点位需要回收,只需要传递空值,public Point toPixelsFromMercator(int x, int y, Point reuse)
x
- 屏幕X坐标y
- 屏幕Y坐标reuse
- 如果没有点位需要回收,只需要传递空值,public Point toMercatorPixels(int x, int y, Point reuse)
x
- 屏幕X坐标y
- 屏幕Y坐标reuse
- 如果没有点位需要回收,只需要传递空值,public float metersToEquatorPixels(float meters)
IProjection
metersToEquatorPixels
在接口中 IProjection
meters
- 米public float metersToPixels(float meters)
meters
- 距离米public IGeoPoint getNorthEast()
IProjection
getNorthEast
在接口中 IProjection
public IGeoPoint getSouthWest()
IProjection
getSouthWest
在接口中 IProjection
public Matrix getInvertedScaleRotateCanvasMatrix()
public Point unrotateAndScalePoint(int x, int y, Point reuse)
x
- 固定点位置X轴y
- 固定点位置Y轴reuse
- 如果没有点位需要回收,只需要传递空值public Point rotateAndScalePoint(int x, int y, Point reuse)
x
- 固定点位置X轴y
- 固定点位置Y轴reuse
- 如果没有点位需要回收,只需要传递空值