Methods
(async, static) animatePositionByViewPoint(postion, viewCenterPoint, duration) → {Promise.<void>}
动画到指定位置(中心点为视图的指定中心)
Parameters:
| Name | Type | Description |
|---|---|---|
postion |
要动画到的位置 | |
viewCenterPoint |
自定义视图中心 | |
duration |
持续时间(单位毫秒) |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) clearTextureCache() → {Promise.<void>}
清除纹理缓存
- Source:
Returns:
- Type
- Promise.<void>
(async, static) forceRefresh() → {Promise.<void>}
地图强制刷新
- Source:
Returns:
- Type
- Promise.<void>
(async, static) getAnnotationsOverlay() → {Promise.<AnnotationsOverlay>}
获取地图标记层
- Source:
Returns:
标记层
- Type
- Promise.<AnnotationsOverlay>
(async, static) getBackGroundColor() → {Promise.<Number>}
获取视图背景色
- Source:
Returns:
获取到的地图视图背景色。
- Type
- Promise.<Number>
(async, static) getBitmap(dispRange, path) → {Promise.<String>}
根据指定的地图范围绘制地图,将绘制返回的图片存储在指定文件夹下.
详细说明:
地图范围的指定采用地图坐标,成生的图像的宽高由用户在构造Bitmap对象时指定.
生成的图像不包含地图视图的背景色.
生成的图像含有透明通道,在视图上显示时,需要设置视图的背景颜色.如:可以设为地图视图的背景色.
特别说明:
用户构造的Bitmap像素格式必须为ARGB_8888
示例代码:
无
Parameters:
| Name | Type | Description |
|---|---|---|
dispRange |
指定的出图范围 | |
path |
图片存储的文件夹路径 |
- Source:
Returns:
返回的是图片存储路径,若路径为“”,表示出图失败
- Type
- Promise.<String>
(async, static) getCenterPoint() → {Promise.<Dot>}
获取地图中心点
- Source:
Returns:
中心点的坐标
- Type
- Promise.<Dot>
(async, static) getCrossBitmap(seg1, seg2, seg3) → {Promise.<{result: Promise.result, uri: Promise.uri}>}
根据传入的参数生成,对应路口的放大图
用户构造的Bitmap像素格式必须为ARGB_8888
用户构造的Bitmap像素格式必须为ARGB_8888
Parameters:
| Name | Type | Description |
|---|---|---|
seg1 |
路口前一段路的地图坐标 | |
seg2 |
路口后一段路的地图坐标 | |
seg3 |
如果路口是环岛,则需要传入环岛下一段路的地图坐标 |
- Source:
Returns:
- Type
- Promise.<{result: Promise.result, uri: Promise.uri}>
(async, static) getDispRange() → {Promise.<Rect>}
获取当前显示地图的显示范围
- Source:
Returns:
地图范围
- Type
- Promise.<Rect>
(async, static) getGraphicsOverlay() → {Promise.<GraphicsOverlay>}
获取缺省的图形覆盖物列表
- Source:
Returns:
缺省的图形覆盖物列表
- Type
- Promise.<GraphicsOverlay>
(async, static) getGraphicsOverlays() → {Promise.<GraphicsOverlays>}
获取图形覆盖物列表的集合
- Source:
Returns:
图形覆盖物列表的集合
- Type
- Promise.<GraphicsOverlays>
(async, static) getHeight() → {Promise.<Number>}
获取地图视图高度
- Source:
Returns:
返回高度
- Type
- Promise.<Number>
(async, static) getLogoPoistion() → {Promise.<int>}
获取中地公司logo在地图视图中的显示位置
- Source:
- See:
-
- LOGO_POSITION_BOTTOM_LEFT等
Returns:
中地公司logo在地图视图中的显示位置
- Type
- Promise.<int>
(async, static) getMap() → {Promise.<Map>}
获取地图对象
- Source:
Returns:
成功返回地图对象,失败返回空
- Type
- Promise.<Map>
(async, static) getMaxResolution() → {Promise.<Dot.resolution>}
获取最大分辨率
- Source:
Returns:
- Type
- Promise.<Dot.resolution>
(async, static) getMaxTextureCacheSize() → {Promise.<Number>}
获取纹理缓存的最大限额(单位为字节)
- Source:
Returns:
设定的纹理缓存的最大限额
- Type
- Promise.<Number>
(async, static) getMeasuredHeight() → {Promise.<Number>}
获取地图视图测量高度
- Source:
Returns:
返回测量高度
- Type
- Promise.<Number>
(async, static) getMeasuredWidth() → {Promise.<Number>}
获取地图视图测量宽度
- Source:
Returns:
返回测量宽度
- Type
- Promise.<Number>
(async, static) getMinResolution() → {Promise.<Dot.resolution>}
获取最小分辨率
- Source:
Returns:
分辨率信息
- Type
- Promise.<Dot.resolution>
(async, static) getModelsOverlay() → {Promise.<ModelsOverlay>}
获取模型覆盖物列表
- Source:
Returns:
模型覆盖物列表
- Type
- Promise.<ModelsOverlay>
(async, static) getNorthArrowPosition() → {Promise.<PointF>}
获取指北针图标中心点在地图视图中的显示位置
- Source:
Returns:
- Type
- Promise.<PointF>
(async, static) getPosition() → {Promise.<MapPosition>}
获取当前位置
- Source:
Returns:
当前地图的位置
- Type
- Promise.<MapPosition>
(async, static) getResolution() → {Promise.<double>}
获取地图分辨率
- Source:
Returns:
分辨率信息
- Type
- Promise.<double>
(async, static) getRotateAngle() → {Promise.<Dot.rotateAngle>}
获取当前地图的旋转角
- Source:
Returns:
旋转角
- Type
- Promise.<Dot.rotateAngle>
(async, static) getRotateCenter() → {Promise.<Dot>}
获取地图的旋转中心
- Source:
Returns:
旋转中心的坐标
- Type
- Promise.<Dot>
(async, static) getScaleBarPoistion() → {Promise.<PointF>}
获取比例尺在地图视图中的显示位置
- Source:
Returns:
比例尺在地图视图中的显示位置
- Type
- Promise.<PointF>
(async, static) getScreenSnapshot(path) → {Promise.<String>}
获取当前地图视图的快照(截图)并返回图片路径
Parameters:
| Name | Type | Description |
|---|---|---|
path |
截图存储的文件夹路径 |
- Source:
Returns:
成功--图片路径不为“”, 失败---图片路径为“”
- Type
- Promise.<String>
(async, static) getScreenSnapshotByParam(path, left, top, width, height) → {Promise.<Object>}
获取当前地图视图指定区域的快照(截图),视图区域的指定采用视图坐标系,通过左上角点的坐标和区域的宽高来确定,视图左上角坐标为(0, 0)
如果指定区域超出视图范围,则超出部分以透明色填充
如果指定区域超出视图范围,则超出部分以透明色填充
Parameters:
| Name | Type | Description |
|---|---|---|
path |
截图的存储文件夹路径 | |
left |
指定视图区域的左上角点的x坐标 | |
top |
指定视图区域的左上角点的y坐标 | |
width |
指定视图区域的宽度 | |
height |
指定视图区域的高度 |
- Source:
Returns:
返回的是包含left, top ,width, height, bitmapPath的Object,若bitmapPath为“”,表示截屏失败
- Type
- Promise.<Object>
(async, static) getSlopeAngle() → {Promise.<float>}
获取当前地图的倾斜角
- Source:
Returns:
当前地图的倾斜角
- Type
- Promise.<float>
(async, static) getWidth() → {Promise.<Number>}
获取地图视图宽度
- Source:
Returns:
返回宽度
- Type
- Promise.<Number>
(async, static) getZoomControlPosition() → {Promise.<PointF>}
获取缩放按钮的位置
- Source:
Returns:
缩放按钮的位置
- Type
- Promise.<PointF>
(async, static) graphicHitTest(graphic, viewPoint) → {Promise.<Boolean>}
图形点击测试
Parameters:
| Name | Type | Description |
|---|---|---|
graphic |
||
viewPoint |
- Source:
Returns:
是否被选中
- Type
- Promise.<Boolean>
(async, static) graphicsOverlayHitTest(graphicsOverlay, viewPoint) → {Promise.<Graphic>}
图形覆盖物点击测试
Parameters:
| Name | Type | Description |
|---|---|---|
graphicsOverlay |
||
viewPoint |
- Source:
Returns:
被选中的图形覆盖物
- Type
- Promise.<Graphic>
(async, static) hideMagnifier() → {Promise.<void>}
隐藏放大镜
- Source:
Returns:
- Type
- Promise.<void>
(async, static) isDoubleTapZooming() → {Promise.<boolean>}
获取是否双击放大地图
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isLabelRenderAnimating() → {Promise.<boolean>}
获取是否启用标记渲染的动画
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isMapPanGesturesEnabled() → {Promise.<boolean>}
获取是否启用了平移手势
- Source:
Returns:
是否启用了平移手势
- Type
- Promise.<boolean>
(async, static) isMapRotateGesturesEnabled() → {Promise.<boolean>}
获取是否启用了地图旋转手势
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isMapSlopeGesturesEnabled() → {Promise.<boolean>}
获取是否启用了地图倾斜手势
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isMapZoomGesturesEnabled() → {Promise.<boolean>}
获取是否启用了地图缩放手势
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isPanEndAnimating() → {Promise.<boolean>}
获取是否启用平移结束后的动画
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isShowLogo() → {Promise.<Boolean>}
获取是否显示中地公司logo
- Source:
Returns:
值为true时显示,反之,没显示
- Type
- Promise.<Boolean>
(async, static) isShowNorthArrow() → {Promise.<Boolean>}
获取是否显示指北针图标
- Source:
Returns:
返回值为true时,显示指北针图标。反之,没有显示指北针图标
- Type
- Promise.<Boolean>
(async, static) isShowScaleBar() → {Promise.<boolean>}
获取是否显示比例尺
- Source:
Returns:
值为true时显示,反之,没显示
- Type
- Promise.<boolean>
(async, static) isSkySceneEnabled() → {Promise.<boolean>}
获取天空场景是否启用的标志
- Source:
Returns:
天空场景是否启用的标志
- Type
- Promise.<boolean>
(async, static) isSupportTransparency() → {Promise.<boolean>}
是否支持任意透明度
- Source:
Returns:
- Type
- Promise.<boolean>
(async, static) isTwoFingerTapZooming() → {Promise.<boolean>}
获取是否双指单击缩小地图
- Source:
Returns:
值为true时启用,反之,不启用
- Type
- Promise.<boolean>
(async, static) isZoomControlsEnabled() → {Promise.<boolean>}
获取是否启用了内置的缩放按钮
- Source:
Returns:
缩放按钮是否启用
- Type
- Promise.<boolean>
(async, static) loadFromDocument(doc, indexOfMap) → {Promise.<Number>}
加载文档中对应索引的地图,同步方法
Parameters:
| Name | Type | Description |
|---|---|---|
doc |
object | 地图文档对象 |
indexOfMap |
number | 文档中map序号 |
- Source:
Returns:
加载成功,返回值>0,失败,返回<=0
- Type
- Promise.<Number>
(async, static) loadFromDocumentAsync(doc, indexOfMap) → {Promise.<void>}
加载文档中对应索引的地图,异步方法
Parameters:
| Name | Type | Description |
|---|---|---|
doc |
object | 地图文档对象 |
indexOfMap |
number | indexOfMap 文档中map序号 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) loadFromFile(strMapPath) → {Promise.<Number>}
加载地图
Parameters:
| Name | Type | Description |
|---|---|---|
strMapPath |
String | docPath 地图文档全路径 |
- Source:
Returns:
加载成功,返回值>0,失败,返回<=0
- Type
- Promise.<Number>
(async, static) loadFromFileAsync(strMapPath) → {Promise.<void>}
加载地图,异步方法,可通过MapViewMapLoadListener来监听加载状态
Parameters:
| Name | Type | Description |
|---|---|---|
strMapPath |
String | 地图文档全路径 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) mapPointToViewPoint(dot) → {Promise.<PointF>}
地图坐标转视图坐标
Parameters:
| Name | Type | Description |
|---|---|---|
dot |
object | 地图坐标 |
- Source:
Returns:
视图坐标
- Type
- Promise.<PointF>
(async, static) modelLayerHitTest(modelLayer, viewPoint) → {Promise.<Model>}
点击选中的模型可以将其添加到ModelsOverlay中,然后进行参数的修改,最后再通过SimpleModelLayerUtil更新回modelLayer
模型层点击测试
Parameters:
| Name | Type | Description |
|---|---|---|
modelLayer |
||
viewPoint |
- Source:
Returns:
- Type
- Promise.<Model>
(async, static) modelsOverlayHitTest(viewPoint) → {Promise.<Model>}
模型覆盖物点击测试
Parameters:
| Name | Type | Description |
|---|---|---|
viewPoint |
- Source:
Returns:
被选中的模型覆盖物
- Type
- Promise.<Model>
(async, static) moveMap(mx, my, animated) → {Promise.<void>}
* 移动地图(单位像素) 如果传入的mx = 5 、 my = 0,则系统将可视区域向右移动,所以地图将显示为向左移动5 个像素。 如果传入的mx =
0 、 my = 5,则系统将可视区域向下移动,所以地图显示为向上移动了5 个像素。
Parameters:
| Name | Type | Description |
|---|---|---|
mx |
水平方向移动的像素大小,正值代表可视区域向右移动,负值代表可视区域向左移动 | |
my |
垂直方向移动的像素大小,正值代表可视区域向下移动,负值代表可视区域向上移动 | |
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) panToCenter(mapCenterPoint, animated) → {Promise.<void>}
平移地图到视图中心(视图高宽1/2处,绝对中心)
Parameters:
| Name | Type | Description |
|---|---|---|
mapCenterPoint |
中心坐标 | |
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) panToCenterWithView(mapCenterPoint, viewCenterPoint, animated) → {Promise.<void>}
平移地图到自定义视图中心(视图高宽1/2处,绝对中心)
Parameters:
| Name | Type | Description |
|---|---|---|
mapCenterPoint |
中心坐标 | |
viewCenterPoint |
自定义视图中心 | |
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) refresh() → {Promise.<void>}
地图刷新
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerAnimationListener() → {Promise.<void>}
地图视图动画的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerAnnotationListener() → {Promise.<void>}
地图视图标记的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerCenterChangedListener() → {Promise.<void>}
添加地图视图中心点变化的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerDoubleTapListener() → {Promise.<void>}
添加双击事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerLongTapListener() → {Promise.<void>}
添加长按事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerMapLoadListener() → {Promise.<void>}
地图视图地图加载的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerPositionChangedListener() → {Promise.<void>}
地图视图地图位置变化的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerRefreshListener() → {Promise.<void>}
地图视图刷新的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerRotateChangedListener() → {Promise.<void>}
添加地图视图旋转角度变化的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerTapListener() → {Promise.<void>}
添加单击事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerTouchListener() → {Promise.<void>}
添加触摸事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) registerZoomChangedListener() → {Promise.<void>}
添加地图视图级别改变的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) restore(animated) → {Promise.<void>}
地图复位
Parameters:
| Name | Type | Description |
|---|---|---|
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) rotate(rotation, pivotX, pivotY, animated) → {Promise.<void>}
绕视图坐标旋转
Parameters:
| Name | Type | Description |
|---|---|---|
rotation |
旋转增量(单位为角度制,逆时针为正) | |
pivotX |
视图旋转中心X坐标 | |
pivotY |
视图旋转中心Y坐标 | |
animated |
是否启用动画 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setBackGroundColor(color) → {Promise.<void>}
设置视图背景色
Parameters:
| Name | Type | Description |
|---|---|---|
color |
String | 地图视图的背景颜色 eg:'rgba(128, 128, 128, 0.5)' |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setBackGroundImage(image) → {Promise.<Void>}
设置背景图像,传null将取消背景图片显示
Parameters:
| Name | Type | Description |
|---|---|---|
image |
Object | 背景图片---Image.js类生成的对象 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setDoubleTapZooming(enabled) → {Promise.<void>}
设置是否双击放大地图
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
Boolean | 值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setLabelRenderAnimating(enabled) → {Promise.<void>}
设置是否启用标记渲染的动画
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setLogoPoistion(position) → {Promise.<void>}
设置中地公司logo在地图视图中显示的位置
Parameters:
| Name | Type | Description |
|---|---|---|
position |
logo的方位 |
- Source:
- See:
-
- LOGO_POSITION_BOTTOM_LEFT等
Returns:
- Type
- Promise.<void>
(async, static) setMap(map) → {Promise.<Number>}
设置地图对象,同步方法
Parameters:
| Name | Type | Description |
|---|---|---|
map |
object | 地图对象 |
- Source:
Returns:
设置成功,返回值>0,设置失败,返回值<=0
- Type
- Promise.<Number>
(async, static) setMapAsync(map) → {Promise.<void>}
设置地图对象,异步方法
Parameters:
| Name | Type | Description |
|---|---|---|
map |
object | 地图对象 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setMapPanGesturesEnabled(enabled) → {Promise.<void>}
设置是否启用地图平移手势
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setMapSlopeGesturesEnabled(enabled) → {Promise.<void>}
设置是否启用地图倾斜手势
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setMapTool() → {Promise.<void>}
设置自定义的地图工具
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setMapZoomGesturesEnabled(enabled) → {Promise.<void>}
设置是否启用地图缩放手势
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setMaxTextureCacheSize() → {Promise.<void>}
设置纹理缓存的最大限额(单位为字节)
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setNorthArrowImage(image) → {Promise.<void>}
设置指北针图标
Parameters:
| Name | Type | Description |
|---|---|---|
image |
指北针图标位图 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setPanEndAnimating(enabled) → {Promise.<void>}
设置是否启用平移结束后的动画
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setRotateAngle(rotateAngle, animated) → {Promise.<void>}
设置地图的旋转角
Parameters:
| Name | Type | Description |
|---|---|---|
rotateAngle |
旋转角(单位为角度制,逆时针为正) | |
animated |
是否启用动画 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setRotateCenter(rotateCenter) → {Promise.<void>}
设置地图的旋转中心
Parameters:
| Name | Type | Description |
|---|---|---|
rotateCenter |
地图的旋转中心 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setRotateCenterAndAngle(rotateCenter, rotateAngle, animated) → {Promise.<void>}
设置当前地图的旋转中心和旋转角
Parameters:
| Name | Type | Description |
|---|---|---|
rotateCenter |
旋转中心点坐标 | |
rotateAngle |
旋转角度(单位为角度制,逆时针为正) | |
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setScaleBarPoistion(point) → {Promise.<void>}
设置比例尺在地图视图中显示的位置
Parameters:
| Name | Type | Description |
|---|---|---|
point |
视图坐标 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setShowNorthArrow(show的值为true时显示指北针图标,反正不显示指北针图标) → {Promise.<void>}
设置是否显示指北针图标
Parameters:
| Name | Type | Description |
|---|---|---|
show的值为true时显示指北针图标,反正不显示指北针图标 |
Boolean |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setShowScaleBar(show) → {Promise.<void>}
设置是否显示比例尺
Parameters:
| Name | Type | Description |
|---|---|---|
show |
值为true时显示,反之,不显示 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setSkyImage(image) → {Promise.<void>}
设置天空图片
Parameters:
| Name | Type | Description |
|---|---|---|
image |
天空图片 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setSkySceneEnabled(enabled) → {Promise.<void>}
设置天空场景是否启用,天空场景启用后,倾斜角可以加大到65度,默认情况下,天空场景处于启用状态
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
天空场景是否启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setSlopeAngle(slopeAngle, animated) → {Promise.<void>}
设置当前地图的倾斜角,并将地图按该角度进行倾斜
Parameters:
| Name | Type | Description |
|---|---|---|
slopeAngle |
倾斜角度(单位为角度制,0到45度,当天空场景启用后,角度范围为0到65度) | |
animated |
是否开启动画 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setSupportTransparency(support) → {Promise.<void>}
设置支持任意透明度
Parameters:
| Name | Type | Description |
|---|---|---|
support |
true(支持矢量数据或者瓦片数据中的任意透明度值) false(仅支持全透) |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setTwoFingerTapZooming(enabled) → {Promise.<void>}
设置是否双指单击缩小地图
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
Boolean | 值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setZoomControlPosition(pointF) → {Promise.<void>}
设置缩放按钮的位置
Parameters:
| Name | Type | Description |
|---|---|---|
pointF |
PointF | 位置点 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setZoomControlsEnabled(enabled) → {Promise.<void>}
设置是否启用MapView内置的地图放大、缩小按钮。通过内置的缩放按钮,可实现对地图的放大和缩小
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
值为true时启用,反之,不启用 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) showMagnifier(viewPointF, option) → {Promise.<void>}
显示放大镜.放大地图视图上指定区域的内容
Parameters:
| Name | Type | Description |
|---|---|---|
viewPointF |
放大区域的中心点 | |
option |
放大镜选项 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) stopAnimation() → {Promise.<void>}
停止动画效果
- Source:
Returns:
- Type
- Promise.<void>
(async, static) stopCurRequest() → {Promise.<void>}
停止当前的获取数据的请求(从服务器请求或从本地请求)
- Source:
Returns:
- Type
- Promise.<void>
(async, static) swipe(swipeLayer, swipeRegionDots) → {Promise.<Number>}
对当前地图中指定图层应用卷帘效果
特别说明:由于移动端相邻的离线矢量图层是由同一个层渲染器渲染,所以对其中的任一离线矢量图层应用卷帘,会对相邻的所有离线矢量图层都起作用。
Parameters:
| Name | Type | Description |
|---|---|---|
swipeLayer |
应用卷帘的图层,传null关闭卷帘效果 | |
swipeRegionDots |
object | 卷帘区域(应用卷帘的图层被擦除的区域),为视图坐标,原点在视图的左上角,区域必须为闭合区(首尾点应重合) |
- Source:
Returns:
0:失败,1:成功
- Type
- Promise.<Number>
(async, static) turnOffMagnifier() → {Promise.<void>}
关闭放大镜功能
- Source:
Returns:
- Type
- Promise.<void>
(async, static) turnOnMagnifier(magnifierOption) → {Promise.<void>}
打开放大镜功能 .当手指在屏幕上移动时,可自动放大手指所在位置的内容
Parameters:
| Name | Type | Description |
|---|---|---|
magnifierOption |
放大镜选项 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterAnimationListener() → {Promise.<void>}
移除地图视图动画的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterAnnotationListener() → {Promise.<void>}
移除地图视图标记的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterCenterChangedListener() → {Promise.<void>}
移除地图视图中心点变化的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterDoubleTapListener() → {Promise.<void>}
移除双击事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterLongTapListener() → {Promise.<void>}
移除长按事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterMapLoadListener() → {Promise.<void>}
移除地图加载监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterPositionChangedListener() → {Promise.<void>}
移除地图视图地图位置变化的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterRefreshListener() → {Promise.<void>}
移除地图视图刷新的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterRotateChangedListener() → {Promise.<void>}
移除地图视图旋转角度变化的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterTapListener() → {Promise.<void>}
移除单击事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterTouchListener() → {Promise.<void>}
移除触摸事件监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) unregisterZoomChangedListener() → {Promise.<void>}
移除地图视图级别改变的监听
- Source:
Returns:
- Type
- Promise.<void>
(async, static) updatePosition(postion, animated) → {Promise.<void>}
更新位置(中心点为视图的绝对中心)
Parameters:
| Name | Type | Description |
|---|---|---|
postion |
要更新到的位置 | |
animated |
是否开启动画 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) viewPointToMapPoint(pointF) → {Promise.<Dot>}
视图坐标转地图坐标
Parameters:
| Name | Type | Description |
|---|---|---|
pointF |
object | 视图坐标 |
- Source:
Returns:
地图坐标
- Type
- Promise.<Dot>
(async, static) zoomIn(animated) → {Promise.<void>}
地图放大一级
Parameters:
| Name | Type | Description |
|---|---|---|
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) zoomOut(animated) → {Promise.<void>}
地图缩小一级
Parameters:
| Name | Type | Description |
|---|---|---|
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) zoomToCenter(mapCenterPoint, resolution, animated) → {Promise.<void>}
缩放地图到指定分辨率并将指定坐标点移动到视图中心(视图高宽1/2处,绝对中心)
Parameters:
| Name | Type | Description |
|---|---|---|
mapCenterPoint |
中心坐标 | |
resolution |
分辨率 | |
animated |
是否启用动画 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) zoomToCenterWithView(mapCenterPoint, viewCenterPoint, resolution, animated)
缩放地图到指定级别并将指定坐标点移动到自定义视图中心
Parameters:
| Name | Type | Description |
|---|---|---|
mapCenterPoint |
中心坐标 | |
viewCenterPoint |
自定义视图中心 | |
resolution |
分辨率 | |
animated |
是否启用动画 |
- Source:
(async, static) zoomToRange(dispRange, animated) → {Promise.<void>}
放缩地图到指定范围
Parameters:
| Name | Type | Description |
|---|---|---|
dispRange |
新的视图范围 | |
animated |
是否开启动画模式 |
- Source:
Returns:
- Type
- Promise.<void>