Modifier and Type | Class and Description |
---|---|
static interface |
TencentMap.AsyncOperateCallback<T>
异步操作回调
|
static interface |
TencentMap.CancelableCallback
地图变换相关操作的状态回调接口
|
static interface |
TencentMap.InfoWindowAdapter
自定义
Marker 气泡样式接口 |
static interface |
TencentMap.OnCameraChangeListener
当地图发生变化时的调用接口
|
static interface |
TencentMap.OnCompassClickedListener
当地图的罗盘被点击时的回调接口
|
static interface |
TencentMap.OnDismissCallback |
static interface |
TencentMap.OnIndoorStateChangeListener
室内图回调
|
static interface |
TencentMap.OnInfoWindowClickListener
当
Marker 气泡窗口被点击时的回调 |
static interface |
TencentMap.OnMapClickListener
当地图被点击时回调接口
|
static interface |
TencentMap.OnMapLoadedCallback
地图加载完成的回调接口,设置之后只回调一次,如果需要再获取,则需要重新设置回调
|
static interface |
TencentMap.OnMapLongClickListener
当地图被长按时回调接口
|
static interface |
TencentMap.OnMapPoiClickListener
poi点击listener
|
static interface |
TencentMap.OnMarkerClickListener
当
Marker 被点击时回调接口 |
static interface |
TencentMap.OnMarkerDragListener
当
Marker 被拖动时回调接口 |
static interface |
TencentMap.OnMyLocationChangeListener
地图接收到我的位置发生变化时,回调接口
|
static interface |
TencentMap.OnPolylineClickListener
当一条折线被点击时的回调。
|
static interface |
TencentMap.OnTrafficEventClickListener
事件点击回调监听
|
static interface |
TencentMap.SnapshotReadyCallback
地图截图的回调接口,回调是在主线程中运行的。
|
Modifier and Type | Field and Description |
---|---|
static int |
MAP_MODE_NAV
Deprecated.
从4.1.2弃用,请使用
MAP_TYPE_NAVI |
static int |
MAP_MODE_NAV_NIGHT
Deprecated.
从4.1.2弃用,请使用
MAP_TYPE_NIGHT |
static int |
MAP_MODE_NAV_TRAFFIC
Deprecated.
从4.1.2弃用,请使用
MAP_TYPE_TRAFFIC_NAVI |
static int |
MAP_MODE_NORMAL
Deprecated.
从4.1.2弃用,请使用
MAP_TYPE_NORMAL |
static int |
MAP_MODE_NORMAL_TRAFFIC
Deprecated.
从4.1.2弃用,请使用
setTrafficEnabled(boolean) |
static int |
MAP_TYPE_DARK
暗色模式
|
static int |
MAP_TYPE_NAVI
导航模式
|
static int |
MAP_TYPE_NIGHT
夜间模式
|
static int |
MAP_TYPE_NONE
默认的地图类型
|
static int |
MAP_TYPE_NORMAL
普通地图
|
static int |
MAP_TYPE_SATELLITE
卫星图
|
static int |
MAP_TYPE_TRAFFIC_NAVI
导航白天 + 路况样式
用于腾讯导航 sdk |
static int |
MAP_TYPE_TRAFFIC_NIGHT
导航夜间 + 路况样式
用于腾讯导航 sdk |
Modifier | Constructor and Description |
---|---|
protected |
TencentMap() |
protected |
TencentMap(com.tencent.tencentmap.mapsdk.maps.BaseMapView mapView,
android.content.Context context,
TencentMapOptions tencentMapOptions) |
Modifier and Type | Method and Description |
---|---|
Circle |
addCircle(CircleOptions options)
添加圆
|
CustomLayer |
addCustomLayer(CustomLayerOptions options)
添加个性化图层
|
Marker |
addMarker(MarkerOptions options)
添加标注(Marker)
|
Polygon |
addPolygon(PolygonOptions options)
添加多边形
|
Polyline |
addPolyline(PolylineOptions options)
添加线
|
void |
addTencentMapGestureListener(TencentMapGestureListener listener)
添加一个腾讯地图手势监听接口
|
TileOverlay |
addTileOverlay(TileOverlayOptions options)
添加瓦片图层
|
void |
animateCamera(CameraUpdate cameraUpdate)
把地图变换到指定的状态,带动画
|
void |
animateCamera(CameraUpdate cameraUpdate,
long duration,
TencentMap.CancelableCallback cancelableCallback)
以动画的方式把地图变换到指定的状态
|
void |
animateCamera(CameraUpdate cameraUpdate,
TencentMap.CancelableCallback cancelableCallback)
以动画的方式把地图变换到指定的状态
|
CameraPosition |
calculateZoomToSpanLevel(java.util.List<IOverlay> elements,
java.util.List<LatLng> points,
int leftPadding,
int rightPadding,
int topPadding,
int bottomPadding)
计算出要在当前底图可视区域内显示一组元素及一组点的比例尺和中心点(有填边)
目前只有在 CameraPosition.bearing == 0 且 CameraPosition.tilt == 0 时才能获取到正确的值 |
void |
clear()
Deprecated.
从4.3.0弃用,建议使用 {
clearAllOverlays() } |
void |
clearAllOverlays()
清除地图上所有的标注类(Marker、Polyline、Polygon,TileOverlay除外)
|
void |
clearCache()
清理缓存
将自定义瓦片、卫星图、底图等缓存数据进行清理
|
void |
enableMultipleInfowindow(boolean enable)
设置地图是否允许多InfoWindow模式,默认是false(只允许显示一个InfoWindow)
注意:此方法需要在addMarker之前调用。
|
java.lang.String |
getActivedIndoorBuilding(LatLng outPosition)
Deprecated.
从4.2.4弃用,室内图信息的获取应从回调中监听
|
java.lang.String[] |
getActivedIndoorFloorNames()
获取当前激活状态室内图的楼层名称列表
|
java.util.List<LatLng> |
getBounderPoints(Marker marker)
获取marker外包点集
|
CameraPosition |
getCameraPosition()
获取当前地图的状态(包括中心点、比例尺、旋转角、倾斜角)
|
java.lang.String |
getCityName(LatLng latLng)
获得当前经纬度所在的城市名称
|
java.lang.String |
getDebugError()
获取地图引擎的Debug日志,在出现问题时用于日志分析
|
int |
getIndoorFloorId()
获取当前激活状态室内图Building的选中楼层ID
|
com.tencent.map.lib.MapLanguage |
getLanguage()
Deprecated.
从4.1.1.1弃用,目前地图暂不支持多语言
|
int |
getMapHeight()
获取 mapview 高度
|
com.tencent.map.sdk.basemap.manages.MapManager |
getMapManager() |
android.graphics.Rect |
getMapPadding()
获取底图相对上、下、左、右的边距
|
protected com.tencent.tencentmap.mapsdk.maps.internal.TencentMapPro |
getMapPro()
获取内部map对象
|
int |
getMapStyle()
获取当前地图的样式
|
int |
getMapType()
获取地图类型
|
int |
getMapWidth()
获取 mapview 宽度
|
float |
getMaxZoomLevel()
获取地图最大的支持的缩放级别
|
float |
getMinZoomLevel()
获取地图最小的支持的缩放级别
|
android.location.Location |
getMyLocation()
获取我的位置
|
Projection |
getProjection()
获取坐标转换操作对象
|
UiSettings |
getUiSettings()
获取地图界面操作对象
|
java.lang.String |
getVersion()
获取当前地图SDK的版本号
|
protected com.tencent.map.sdk.basemap.controllers.ViewControl |
getViewControl() |
float |
getZoomToSpanLevel(LatLng leftUpper,
LatLng rightDown)
根据两个经纬度指定一个范围,计算出当前屏幕如果要显示这个指定范围所要的缩放级别(需要等地图加载完成再调用)
|
boolean |
isBlockRouteEnabled()
Deprecated.
|
boolean |
isDestroyed()
判断当前这个地图是不是已经被销毁了
|
boolean |
isHandDrawMapEnable()
当前手绘图是否处于开启状态
|
boolean |
isMyLocationEnabled()
获取是否显示我的位置
|
boolean |
isSateLiteEnable()
Deprecated.
@since 4.3.0 使用
getMapType() MAP_TYPE_SATELLITE 替代 |
boolean |
isTrafficEnabled()
获取地图当前是否开启实时交通路况
|
void |
loadKMLFile(java.lang.String filePath)
加载 KML 文件
|
void |
moveCamera(CameraUpdate cameraUpdate)
把地图变换到指定的状态
|
protected void |
onMapDestroy() |
protected void |
onMapPause() |
protected void |
onMapRestart() |
protected void |
onMapResume() |
protected void |
onMapStart() |
protected void |
onMapStop() |
void |
removeTencentMapGestureListener(TencentMapGestureListener listener)
移除一个腾讯地图手势监听接口
|
void |
setBlockRouteEnabled(boolean enable)
Deprecated.
|
void |
setBuildingEnable(boolean use3DStyle)
设置是否显示3D建筑
|
void |
setCameraCenterProportion(float x,
float y)
设置camera变换的中心点并将变换中心点设置为地图当前的中心点
|
void |
setCameraCenterProportion(float x,
float y,
boolean moveMap)
设置camera变换的中心点
|
void |
setDrawPillarWith2DStyle(boolean use2DStyle)
Deprecated.
从4.2.4弃用,建议使用
setBuildingEnable(boolean) 替代 |
void |
setForeignLanguage(Language foreignLanguage)
设置海外图优先显示的语言,默认优先显示中文(在创建地图时设置,不支持动态切换)
|
void |
setHandDrawMapEnable(boolean enable)
设置是否开启手绘图
|
void |
setIndoorEnabled(boolean enable)
设置是否显示室内图
|
void |
setIndoorFloor(int floorId)
设置当前激活状态室内图Building的选中的楼层
|
void |
setIndoorFloor(java.lang.String buildingId,
java.lang.String floorName)
将buildingId对应的室内图建筑物设置到指定楼层展示。
|
void |
setInfoWindowAdapter(TencentMap.InfoWindowAdapter infoWindowAdapter)
设置气泡样式接口
|
void |
setLocationSource(LocationSource locationSource)
设置我的位置信息来源,
|
void |
setMapCenterAndScale(float centerX,
float centerY,
float targetScale)
设置底图中心点及scale, 屏幕左上角为 (0.0f, 0.0f), 右下角(1.0f, 1.0f)
|
void |
setMapStyle(int styleType)
|
void |
setMapType(int mapType)
设置地图类型
|
void |
setMaxZoomLevel(int zoomLevel)
设置地图的最大缩放级别
|
void |
setMinZoomLevel(int zoomLevel)
设置地图的最小缩放级别
|
void |
setMyLocationEnabled(boolean enable)
设置是否显示我的位置
|
void |
setMyLocationStyle(MyLocationStyle myLocationStyle)
设置定位的样式
|
void |
setOnCameraChangeListener(TencentMap.OnCameraChangeListener onCameraChangeListener)
设置地图变换的监听接口
|
void |
setOnCompassClickedListener(TencentMap.OnCompassClickedListener onCompassClickedListener)
设置罗盘位按钮监听接口
|
void |
setOnIndoorStateChangeListener(TencentMap.OnIndoorStateChangeListener listener)
设置室内图状态变化回调
|
void |
setOnInfoWindowClickListener(TencentMap.OnInfoWindowClickListener listener)
设置Marker气泡点击事件监听接口
|
void |
setOnMapClickListener(TencentMap.OnMapClickListener onMapClickListener)
设置地图点击事件的监听接口
|
void |
setOnMapLoadedCallback(TencentMap.OnMapLoadedCallback onMapLoadedCallback)
设置地图加载完成回调接口
|
void |
setOnMapLongClickListener(TencentMap.OnMapLongClickListener onMapLongClickListener)
设置地图长按事件的监听接口
|
void |
setOnMapPoiClickListener(TencentMap.OnMapPoiClickListener listener)
设置地图标注点点击回调
|
void |
setOnMarkerClickListener(TencentMap.OnMarkerClickListener listener)
设置Marker点击事件的监听接口
|
void |
setOnMarkerDragListener(TencentMap.OnMarkerDragListener listener)
设置Marker拖动事件的监听接口
|
void |
setOnMyLocationChangeListener(TencentMap.OnMyLocationChangeListener onMyLocationChangeListener)
设置我的位置变化监听接口
|
void |
setOnPolylineClickListener(TencentMap.OnPolylineClickListener onPolylineClickListener)
设置线被点击时的回调接口
|
void |
setOnTapMapViewInfoWindowHidden(boolean enable)
点击地图其他区域时,InfoWindow是否需要隐藏
|
protected void |
setOnTop(boolean isOnTop)
设置地图是不是在最在最上面。 参见
BaseMapView.setOnTop(boolean) |
void |
setOnTrafficEventClickListener(TencentMap.OnTrafficEventClickListener listener)
事件点击回调
|
void |
setPadding(int left,
int top,
int right,
int bottom)
设置底图相对上、下、左、右的边距
|
void |
setPadding(int left,
int top,
int right,
int bottom,
boolean moveCenter)
设置底图相对上、下、左、右的边距,并移动地图中心点
|
void |
setPointToCenter(int x,
int y)
设置屏幕上的某个像素点为中心
|
void |
setPoisEnabled(boolean enabled)
底图 poi 开关
|
void |
setRestrictBounds(LatLngBounds restrictBounds,
RestrictBoundsFitMode fitMode)
限制地图的显示范围。此接口同时会限制地图的最小缩放级别,用户还可以通过
setMinZoomLevel(int) 修改自己需要的最小缩放级别获取需要的展示效果 |
void |
setSatelliteEnabled(boolean enable)
Deprecated.
@since 4.3.0 使用
setMapType(int) MAP_TYPE_SATELLITE 替代 |
void |
setTencentMapGestureListener(TencentMapGestureListener listener)
Deprecated.
|
void |
setTrafficEnabled(boolean enable)
开启或关闭实时交通路况的功能
|
void |
snapshot(TencentMap.SnapshotReadyCallback callback)
获取地图当前截图
如果调用了 animateCamera 接口,请在 CameraChangeFinished 回调后再进行截图 |
void |
snapshot(TencentMap.SnapshotReadyCallback callback,
android.graphics.Bitmap.Config config)
获取地图当前截图
如果调用了 animateCamera 接口,请在 CameraChangeFinished 回调后再进行截图 |
void |
stopAnimation()
停止地图所有正在进行的动画
|
public static final int MAP_TYPE_NONE
public static final int MAP_TYPE_NORMAL
setMapType(int)
设置public static final int MAP_TYPE_DARK
public static final int MAP_TYPE_SATELLITE
public static final int MAP_TYPE_TRAFFIC_NAVI
public static final int MAP_TYPE_TRAFFIC_NIGHT
public static final int MAP_TYPE_NIGHT
public static final int MAP_TYPE_NAVI
public static final int MAP_MODE_NORMAL
MAP_TYPE_NORMAL
public static final int MAP_MODE_NORMAL_TRAFFIC
setTrafficEnabled(boolean)
public static final int MAP_MODE_NAV
MAP_TYPE_NAVI
public static final int MAP_MODE_NAV_TRAFFIC
MAP_TYPE_TRAFFIC_NAVI
public static final int MAP_MODE_NAV_NIGHT
MAP_TYPE_NIGHT
protected TencentMap(com.tencent.tencentmap.mapsdk.maps.BaseMapView mapView, android.content.Context context, TencentMapOptions tencentMapOptions)
protected TencentMap()
protected com.tencent.map.sdk.basemap.controllers.ViewControl getViewControl()
public com.tencent.map.sdk.basemap.manages.MapManager getMapManager()
getMapManager
in class BaseMap
public final CameraPosition getCameraPosition()
CameraPosition
public final float getZoomToSpanLevel(LatLng leftUpper, LatLng rightDown)
leftUpper
- 左上角要显示的经纬度rightDown
- 右下角要显示的经纬度public final float getMaxZoomLevel()
public final float getMinZoomLevel()
public final void setOnTapMapViewInfoWindowHidden(boolean enable)
enable
- 隐藏开关
true:点击地图其他区域,隐藏InfoWindow
false:点击地图其他区域,不隐藏InfoWindow
public final void moveCamera(CameraUpdate cameraUpdate)
cameraUpdate
- 状态对象 参见CameraUpdate
public final void animateCamera(CameraUpdate cameraUpdate)
cameraUpdate
- 状态对象 参见CameraUpdate
public final void animateCamera(CameraUpdate cameraUpdate, TencentMap.CancelableCallback cancelableCallback)
cameraUpdate
- 状态对象 参见CameraUpdate
cancelableCallback
- 动画状态监听器TencentMap.CancelableCallback
public final void animateCamera(CameraUpdate cameraUpdate, long duration, TencentMap.CancelableCallback cancelableCallback)
cameraUpdate
- 状态对象 参见CameraUpdate
duration
- 动画执行时间(单位:ms)cancelableCallback
- 动画状态监听器TencentMap.CancelableCallback
public final void stopAnimation()
public final TileOverlay addTileOverlay(TileOverlayOptions options)
options
- 瓦片选项public final CustomLayer addCustomLayer(CustomLayerOptions options)
options
- 图层选项public final Polyline addPolyline(PolylineOptions options)
options
- 线属性,参见PolylineOptions
public final Polygon addPolygon(PolygonOptions options)
options
- 多边形属性,参见PolygonOptions
public final Circle addCircle(CircleOptions options)
options
- 折线的参数,参见CircleOptions
public final Marker addMarker(MarkerOptions options)
options
- marker 属性,参见MarkerOptions
public final void clearAllOverlays()
public final void clear()
clearAllOverlays()
}public final void clearCache()
建议在线程中执行
public final void setMapType(int mapType)
mapType
- 仅限设置为:MAP_TYPE_NORMAL
、
MAP_TYPE_DARK
、
MAP_TYPE_SATELLITE
public final int getMapType()
public final void setMapStyle(int styleType)
styleType
- 地图样式public final int getMapStyle()
public final boolean isTrafficEnabled()
public final void setTrafficEnabled(boolean enable)
enable
- 是否开启:true 开启 false 关闭public final void setSatelliteEnabled(boolean enable)
setMapType(int)
MAP_TYPE_SATELLITE
替代setMapStyle(int)
/ setMapType(int)
切换样式将不生效
2、关闭卫星图,则恢复到开启卫星图之前设置的样式enable
- 是否开启:true 开启 false 关闭public final boolean isSateLiteEnable()
getMapType()
MAP_TYPE_SATELLITE
替代public final boolean isMyLocationEnabled()
public final void setMyLocationEnabled(boolean enable)
注:地图SDK不负责获取位置,由外界提供,开启地图定位功能
建议使用 腾讯Android定位SDK
设置定位,请参考LocationSource
enable
- 是否显示:true 显示 false 隐藏public final android.location.Location getMyLocation()
public final void setLocationSource(LocationSource locationSource)
locationSource
- 参见LocationSource
public final UiSettings getUiSettings()
UiSettings
public final Projection getProjection()
Projection
public final void setOnCameraChangeListener(TencentMap.OnCameraChangeListener onCameraChangeListener)
onCameraChangeListener
- 参见TencentMap.OnCameraChangeListener
public final void setOnMapClickListener(TencentMap.OnMapClickListener onMapClickListener)
onMapClickListener
- 参见TencentMap.OnMapClickListener
public final void setOnMapLongClickListener(TencentMap.OnMapLongClickListener onMapLongClickListener)
onMapLongClickListener
- 参见TencentMap.OnMapLongClickListener
public final void setOnPolylineClickListener(TencentMap.OnPolylineClickListener onPolylineClickListener)
onPolylineClickListener
- 参见TencentMap.OnPolylineClickListener
public final void setOnMyLocationChangeListener(TencentMap.OnMyLocationChangeListener onMyLocationChangeListener)
onMyLocationChangeListener
- 参见TencentMap.OnMyLocationChangeListener
public final void setOnCompassClickedListener(TencentMap.OnCompassClickedListener onCompassClickedListener)
onCompassClickedListener
- 参见TencentMap.OnCompassClickedListener
public final void setOnMapLoadedCallback(TencentMap.OnMapLoadedCallback onMapLoadedCallback)
onMapLoadedCallback
- 参见TencentMap.OnMapLoadedCallback
protected void onMapRestart()
protected void onMapResume()
protected void onMapStart()
protected void onMapStop()
protected void onMapPause()
protected void onMapDestroy()
public void snapshot(TencentMap.SnapshotReadyCallback callback, android.graphics.Bitmap.Config config)
callback
- 截图回调config
- 截图配置public void snapshot(TencentMap.SnapshotReadyCallback callback)
callback
- 截图回调public final java.lang.String getCityName(LatLng latLng)
latLng
- 经纬度public final void setTencentMapGestureListener(TencentMapGestureListener listener)
addTencentMapGestureListener(TencentMapGestureListener)
}public final void addTencentMapGestureListener(TencentMapGestureListener listener)
listener
- 参见TencentMapGestureListener
public final void removeTencentMapGestureListener(TencentMapGestureListener listener)
listener
- 参见TencentMapGestureListener
public CameraPosition calculateZoomToSpanLevel(java.util.List<IOverlay> elements, java.util.List<LatLng> points, int leftPadding, int rightPadding, int topPadding, int bottomPadding)
CameraPosition.bearing
== 0 且 CameraPosition.tilt
== 0 时才能获取到正确的值elements
- 要显示在底图上的元素points
- 要显示在底图上的点leftPadding
- 要显示的元素和点距离底图左边的边距(必须为正数)rightPadding
- 要显示的元素和点距离底图右边的边距(必须为正数)topPadding
- 要显示的元素和点距离底图上边的边距(必须为正数)bottomPadding
- 要显示的元素和点距离底图下边的边距(必须为正数)public java.lang.String getVersion()
public boolean isDestroyed()
protected void setOnTop(boolean isOnTop)
BaseMapView.setOnTop(boolean)
public void setBuildingEnable(boolean use3DStyle)
use3DStyle
- 是否使用3D的模式绘制楼快,默认是truepublic void setMapCenterAndScale(float centerX, float centerY, float targetScale)
centerX
- 0~1.0fcenterY
- 0~1.0ftargetScale
- 目标scalepublic void setPadding(int left, int top, int right, int bottom)
left
- 左边距top
- 上边距right
- 右边距bottom
- 下边距public void setPadding(int left, int top, int right, int bottom, boolean moveCenter)
left
- 左边距top
- 上边距right
- 右边距bottom
- 下边距public android.graphics.Rect getMapPadding()
public java.util.List<LatLng> getBounderPoints(Marker marker)
public com.tencent.map.lib.MapLanguage getLanguage()
public final void setOnMarkerClickListener(TencentMap.OnMarkerClickListener listener)
listener
- 参见
TencentMap.OnMarkerClickListener
public final void setOnMarkerDragListener(TencentMap.OnMarkerDragListener listener)
listener
- 参见
TencentMap.OnMarkerDragListener
public final void setOnInfoWindowClickListener(TencentMap.OnInfoWindowClickListener listener)
listener
- 参见
TencentMap.OnInfoWindowClickListener
public final void setInfoWindowAdapter(TencentMap.InfoWindowAdapter infoWindowAdapter)
infoWindowAdapter
- 参见
TencentMap.InfoWindowAdapter
public void setMyLocationStyle(MyLocationStyle myLocationStyle)
myLocationStyle
- MyLocationStyle
public final void setOnIndoorStateChangeListener(TencentMap.OnIndoorStateChangeListener listener)
listener
- 参见TencentMap.OnIndoorStateChangeListener
public void setIndoorEnabled(boolean enable)
enable
- true 展示室内图public void setIndoorFloor(int floorId)
public void setIndoorFloor(java.lang.String buildingId, java.lang.String floorName)
buildingId
- 要设置楼层的 buildingIdfloorName
- 楼层名称,参见 IndoorLevel.getName()
public int getIndoorFloorId()
public java.lang.String[] getActivedIndoorFloorNames()
@Deprecated public java.lang.String getActivedIndoorBuilding(LatLng outPosition)
public final void setOnMapPoiClickListener(TencentMap.OnMapPoiClickListener listener)
listener
- 参见TencentMap.OnMapPoiClickListener
public void setCameraCenterProportion(float x, float y)
x
- 变换中心点在 mapView 水平方向的百分比 [0, 1]y
- 变换中心点在 mapView 垂直方向的百分比 [0, 1]public void setCameraCenterProportion(float x, float y, boolean moveMap)
x
- 变换中心点在 mapView 水平方向的百分比 [0, 1]y
- 变换中心点在 mapView 垂直方向的百分比 [0, 1]moveMap
- 是否将变换中心点设置为地图当前的中心点public void setPointToCenter(int x, int y)
x
- X像素坐标y
- Y像素坐标public void setMaxZoomLevel(int zoomLevel)
zoomLevel
- 缩放级别[1~20]public void setMinZoomLevel(int zoomLevel)
zoomLevel
- 缩放级别[1~20]protected com.tencent.tencentmap.mapsdk.maps.internal.TencentMapPro getMapPro()
public final void loadKMLFile(java.lang.String filePath)
filePath
- KML 文件路径public void setDrawPillarWith2DStyle(boolean use2DStyle)
setBuildingEnable(boolean)
替代use2DStyle
- 是否使用2D模式绘制楼快public void setBlockRouteEnabled(boolean enable)
enable
- true
展示封路;false
不展示封路public boolean isBlockRouteEnabled()
true
展示封路;false
不展示封路public void setHandDrawMapEnable(boolean enable)
enable
- true 开启手绘图public boolean isHandDrawMapEnable()
public void enableMultipleInfowindow(boolean enable)
enable
- 是否开启多窗口InfoWindowpublic int getMapWidth()
public int getMapHeight()
public void setForeignLanguage(Language foreignLanguage)
foreignLanguage
- 海外图语言public java.lang.String getDebugError()
public void setPoisEnabled(boolean enabled)
enabled
- 是否开启POIpublic void setRestrictBounds(LatLngBounds restrictBounds, RestrictBoundsFitMode fitMode)
setMinZoomLevel(int)
修改自己需要的最小缩放级别获取需要的展示效果restrictBounds
- 地图显示范围将要限制到的区域,如果要取消限制,可以传入 nullfitMode
- 显示范围适配模式, RestrictBoundsFitMode.FIT_WIDTH
或者 RestrictBoundsFitMode.FIT_HEIGHT
public void setOnTrafficEventClickListener(TencentMap.OnTrafficEventClickListener listener)
listener
-