Package com.baidu.mapapi.map
Class MapStatusUpdateFactory
java.lang.Object
com.baidu.mapapi.map.MapStatusUpdateFactory
生成地图状态将要发生的变化
-
Method Summary
Modifier and TypeMethodDescriptionstatic MapStatusUpdate设置地图新中心点static MapStatusUpdatenewLatLngBounds(LatLngBounds bounds) 设置显示在屏幕中的地图地理范围static MapStatusUpdatenewLatLngBounds(LatLngBounds bounds, int width, int height) 设置显示在规定宽高中的地图地理范围static MapStatusUpdatenewLatLngBounds(LatLngBounds bounds, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) 设置显示在指定相对于MapView的padding中的地图地理范围static MapStatusUpdatenewLatLngZoom(LatLngBounds bounds, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) Deprecated.static MapStatusUpdatenewLatLngZoom(LatLng latLng, float zoom) 设置地图中心点以及缩放级别static MapStatusUpdatenewMapStatus(MapStatus mapStatus) 设置地图新状态static MapStatusUpdatescrollBy(int xPixel, int yPixel) 按像素移动地图中心点static MapStatusUpdatezoomBy(float amount) 根据给定增量缩放地图级别static MapStatusUpdatezoomBy(float amount, android.graphics.Point focus) 根据给定增量以及给定的屏幕坐标缩放地图级别static MapStatusUpdatezoomIn()放大地图缩放级别static MapStatusUpdatezoomOut()缩小地图缩放级别static MapStatusUpdatezoomTo(float zoom) 设置地图缩放级别
-
Method Details
-
newMapStatus
设置地图新状态- Parameters:
mapStatus- 地图新状态- Returns:
- 返回构造的 MapStatusUpdate 对象, 如果 mapStatus 为 null 返回 null
-
newLatLng
设置地图新中心点- Parameters:
latLng- 地图新中心点- Returns:
- 返回构造的 MapStatusUpdate 对象,如果 latLng 为 null 则返回空。
-
newLatLngBounds
设置显示在屏幕中的地图地理范围- Parameters:
bounds- 地图显示地理范围,不能为 null- Returns:
- 返回构造的 MapStatusUpdate, 如果 bounds 为 null 则返回空。
-
newLatLngBounds
设置显示在规定宽高中的地图地理范围- Parameters:
bounds- 地图显示地理范围,不能为 nullwidth- 大于零height- 大于零- Returns:
- 返回构造的 MapStatusUpdate 对象, 如果参数不合法返回 null
-
newLatLngZoom
设置地图中心点以及缩放级别- Parameters:
latLng- 地图中心点,不能为 nullzoom- 缩放级别 [4, 21]- Returns:
- 返回构造的 MapStatusUpdate 对象, 如果参数不合法返回 null
-
scrollBy
按像素移动地图中心点- Parameters:
xPixel- 水平方向移动像素数yPixel- 垂直方向移动像素数- Returns:
- 返回构造的 MapStatusUpdate 对象
-
zoomBy
根据给定增量缩放地图级别- Parameters:
amount- 地图缩放级别增量- Returns:
- 返回构造的 MapStatusUpdate 对象
-
zoomBy
根据给定增量以及给定的屏幕坐标缩放地图级别- Parameters:
amount- 地图缩放级别增量focus- 地图缩放中心点屏幕坐标, 若为 null 则返回 null- Returns:
- 返回构造的 MapStatusUpdate 对象,若 focus 为null 则返回 null
-
zoomIn
放大地图缩放级别- Returns:
- 返回构造的 MapStatusUpdate 对象
-
zoomOut
缩小地图缩放级别- Returns:
- 返回构造的 MapStatusUpdate 对象
-
zoomTo
设置地图缩放级别- Parameters:
zoom- 地图缩放级别- Returns:
- 返回构造的 MapStatusUpdate 对象
-
newLatLngBounds
public static MapStatusUpdate newLatLngBounds(LatLngBounds bounds, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) 设置显示在指定相对于MapView的padding中的地图地理范围- Parameters:
bounds- 地图显示地理范围,不能为nullpaddingLeft- 相对于地图View的左边距,单位为像素paddingTop- 相对于地图View的上边距,单位为像素paddingRight- 相对于地图View的右边距,单位为像素paddingBottom- 相对于地图View的下边距,单位为像素- Returns:
- 返回构造的 MapStatusUpdate 对象, 如果参数不合法返回 null
-
newLatLngZoom
@Deprecated public static MapStatusUpdate newLatLngZoom(LatLngBounds bounds, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) Deprecated.根据Padding设置地理范围的合适缩放级别 该方法的效果已由newLatLngBounds(LatLngBounds, int, int, int, int)替代- Parameters:
bounds- 地图显示地理范围,不能为nullpaddingLeft- 相对于地图View的左边距,单位为像素paddingTop- 相对于地图View的上边距,单位为像素paddingRight- 相对于地图View的右边距,单位为像素paddingBottom- 相对于地图View的下边距,单位为像素- Returns:
- 返回构造的 MapStatusUpdate 对象, 如果参数不合法返回 null
-