public final class MapView
extends android.opengl.GLSurfaceView
地图渲染引擎的视图类,继承Android View的特性。
可以通过xml方式配置,也可以通过代码的方式配置。
通过下面两种方式构建MapView:
xml:
<com.palmap.gl.view.MapView android:id="@+id/mapview" android:layout_width="match_parent" android:layout_height="match_parent"/>
代码:
MapView mapView = new MapView(context);
每一个MapView对象都会有一个name。目前通过xml方式配置的MapView无法自定义name,默认的name是default;通过代码方式创建的,可以自定义name。 这个name能够匹配到style文件中的一个对于该MapView对象的样式配置项。
MapView需要在AndroidManifest.xml中配置如下选项:
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
MapView需要控制生命周期。调用方法如下:
mapView.onResume();
mapView.onPause();
mapView.onDestroy();
mapView.onLowMemory();
MapView初次构建需要一点时间,请尽量使用
mapView.setInitEvent();
android.opengl.GLSurfaceView.EGLConfigChooser, android.opengl.GLSurfaceView.EGLContextFactory, android.opengl.GLSurfaceView.EGLWindowSurfaceFactory, android.opengl.GLSurfaceView.GLWrapper, android.opengl.GLSurfaceView.Rendererandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnCapturedPointerListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener, android.view.View.OnUnhandledKeyEventListener| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
animationDurationTexture |
protected float |
defaultSkewAngle |
protected float |
limitRatio |
protected java.util.concurrent.atomic.AtomicBoolean |
loadingPlanarGraph |
protected android.os.Handler |
mainThreadHandler |
protected java.util.concurrent.atomic.AtomicBoolean |
mapViewDestroyed |
protected OnNaviLineRepeatRenderListener |
mNaviLineRepeatRenderListener |
protected float |
naviLineFactor |
protected OnRenderEvent |
onRenderEvent |
protected boolean |
repeatRenderNaviLine |
DEBUG_CHECK_GL_ERROR, DEBUG_LOG_GL_CALLS, RENDERMODE_CONTINUOUSLY, RENDERMODE_WHEN_DIRTYACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z| 构造器和说明 |
|---|
MapView(android.content.Context context) |
MapView(android.content.Context context,
android.util.AttributeSet attrs) |
MapView(java.lang.String name,
android.content.Context context) |
MapView(java.lang.String name,
android.content.Context context,
android.util.AttributeSet attrs) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
_addModelRenderer(int id,
IModelLoader.FileType fileType,
java.lang.String filePath,
java.lang.String fileName,
boolean merger,
ModelRenderOption option)
添加一个模型渲染
|
protected void |
_addNavigationLineFeature(MapView mapView,
Feature feature,
java.lang.String styleName)
添加渲染一条导航线,将使用指定style渲染
|
protected void |
_animateCamera(CameraUpdate update,
int durationMs,
CameraAnimCallback callback) |
protected void |
_animateCameraGesture(CameraUpdate update,
int durationMs,
CameraAnimCallback callback) |
protected void |
_changeBackgroundColor(int color)
改变地图背景色,如果使用了背景图,背景色将不可见
|
protected void |
_changeBackgroundImage(int res)
修改地图背景图片
_enableBackgroundImage(). |
protected boolean |
_checkInitCompleted() |
protected void |
_clearAllNavigationLineFeature()
清空当前所有的导航线
|
protected void |
_disableBackgroundImage()
不允许使用地图的背景图
|
protected void |
_disableLogo()
不允许使用logo
|
protected void |
_drawPlanarGraph(PlanarGraph planarGraph,
PlanarGraph f0PlanarGraph,
boolean resetCamera)
渲染地图
|
protected void |
_enableBackgroundImage()
要使用背景图片,必须先允许
|
protected void |
_enableLogo()
允许使用logo
|
protected java.lang.String |
_getCurrentFloorId()
获取当前地图的默认楼层
|
protected Coordinate |
_getMapCenter()
获取当前地图的中心点
|
protected Coordinate |
_getMapCenterPoint() |
protected Feature |
_getNavigationLineFeature(int index)
获取某条导航线的数据
|
protected int |
_getNavigationLineSize()
获取当前导航线的数量
|
protected double |
_getZoomLevel()
获取缩放级别
|
protected void |
_loadPlanarGraph(PlanarGraph planarGraph,
PlanarGraph f0PlanarGraph) |
protected void |
_moveToRect(Coordinate leftTop,
Coordinate rightBottom,
int durationMs,
double minZoomLevel,
CameraAnimCallback callback) |
protected void |
_removeAllGeometryRenderer()
移除所有几何渲染元素
|
protected void |
_removeAllModelRenderer()
移除所有模型渲染元素
|
protected void |
_removeAllRoadNetRenderer() |
protected void |
_removeGeometryRenderer(int id)
根据id移除所有的几何渲染元素
|
protected void |
_removeModelRenderer(int rendererId)
根据id移除模型渲染元素
|
protected void |
_removeNavigationLineById(java.lang.String id)
通过id删除符合的所有导航线(如果多条导航线id一致,将会全部被删除)
|
protected void |
_repeatAddNaviLineFeature(MapView mapView,
Feature feature,
NavigationLineLayer naviLineLayer) |
protected void |
_repeatRenderNaviLine()
重复渲染导航线
|
protected void |
_repeatRenderNaviLine(boolean repeat) |
protected Coordinate |
_screenCoordinate2WorldCoordinate(float screenX,
float screenY)
屏幕坐标转世界坐标
|
protected Feature |
_searchRoadNetLineFeatureByWorldCoordinate(Coordinate coordinate,
double distance) |
protected Feature |
_searchRoadNetPointFeatureByWorldCoordinate(Coordinate coordinate,
double distance) |
protected void |
_setFPSEvent(FPSEvent event) |
protected void |
_setInitEvent(OnInitEvent onInitEvent)
地图初始化的事件
|
protected void |
_setLayerVisibility(java.lang.String layerName,
boolean visibility)
设置图层的可用性
|
protected void |
_setLogoPosition(float x,
float y)
设置logo位置
|
protected void |
_setMapBounds(CameraBounds cameraBounds) |
protected void |
_setNaviLineFactor(float naviLineFactor) |
protected void |
_setOnMapLoadedListener(OnMapLoadedListener mapLoadedListener)
地图加载完成的事件
|
protected void |
_setOnNaviLineRepeatRenderListener(OnNaviLineRepeatRenderListener naviLineRepeatRendererListener) |
protected void |
_setRenderEvent(OnRenderEvent onRenderEvent)
地图渲染完成事件
|
protected void |
_submitCircleRenderer(int id,
Coordinate center,
double r,
int color,
float lineWidth)
提交一个圆形渲染元素
|
protected void |
_submitFillCircleRenderer(int id,
Coordinate center,
double r,
int color,
int fillColor,
float lineWidth)
提交一个实心圆形渲染元素
|
protected void |
_submitFillPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
int fillColor,
float lineWidth)
提交一个实心多边形渲染元素
|
protected void |
_submitPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
float lineWidth)
提交一个多边形渲染元素
|
protected void |
_submitRoadNetRenderer(FeatureCollection featureCollection,
int color,
float pointSize) |
protected void |
_updateModelRendererOption(int rendererId,
ModelRenderOption option)
更新某个模型渲染元素的模型矩阵
|
protected void |
_updateRoadNetRendererColor(java.lang.String key,
java.lang.Object val,
int color) |
protected Coordinate |
_worldCoordinate2ScreenCoordinate(Coordinate coordinate)
世界坐标转屏幕坐标
|
void |
addModelRenderer(int id,
IModelLoader.FileType fileType,
java.lang.String filePath,
java.lang.String fileName,
boolean merger,
ModelRenderOption option)
添加一个模型渲染
|
void |
addNavigationLineFeature(FeatureCollection featureCollection)
添加渲染导航线,将使用default style渲染
|
void |
addNavigationLineFeature(FeatureCollection featureCollection,
java.lang.String styleName)
添加渲染导航线,将使用指定style渲染
|
protected void |
addNaviLineLayer()
先removeNaviLineLayer()删除navilinelayer层再添加达到重复渲染达到宽度不随zoomlevel改变而改变的效果
|
void |
addOnFloorChangeListener(OnFloorChangeListener onFloorChangeListener)
添加地图楼层改变监听器
|
<T extends OverlayCell> |
addOverlay(T overlayCell)
添加overlay
|
void |
animateCamera(CameraUpdate update)
相机动画
|
void |
animateCamera(CameraUpdate update,
CameraAnimCallback callback) |
void |
animateCamera(CameraUpdate update,
int durationMs,
CameraAnimCallback callback) |
void |
animateCameraGesture(CameraUpdate update)
相机动画--手势
|
void |
animateCameraGesture(CameraUpdate update,
int durationMs,
CameraAnimCallback callback) |
void |
changeBackgroundColor(int color)
改变地图背景色,如果使用了背景图,背景色将不可见
|
void |
changeBackgroundImage(int res)
修改地图背景图片
enableBackgroundImage(). |
boolean |
checkInitCompleted()
检查openGL环境是否初始化完成
|
void |
clearAllNavigationLineFeature()
清空当前所有的导航线
|
void |
disableBackgroundImage()
不允许使用地图的背景图
|
void |
disableLogo()
不允许使用logo
|
protected void |
doCollisionDetection() |
void |
doCollisionDetectionWithAnimator()
碰撞检测 显示文字 消失动画效果
|
void |
drawPlanarGraph(PlanarGraph planarGraph)
渲染地图 (默认不重置相机)
|
void |
drawPlanarGraph(PlanarGraph planarGraph,
PlanarGraph f0PlanarGraph)
渲染地图 (默认不重置相机)
|
void |
drawPlanarGraph(PlanarGraph planarGraph,
PlanarGraph f0PlanarGraph,
boolean resetCamera)
渲染地图
|
void |
enableBackgroundImage()
要使用背景图片,必须先允许
|
void |
enableCompass(boolean isEnable) |
void |
enableFloorView(boolean isEnable) |
void |
enableLogo()
要使用logo,必须先允许
|
void |
enableScaleView(boolean isEnable) |
void |
enableZoomView(boolean isEnable) |
protected FeatureLayer |
getAreaLayer()
搜索当前楼层的areaLayer
|
protected java.util.List<FeatureLayer> |
getAreaLayers()
搜索所有楼层的areaLayer
|
protected FeatureLineLayer |
getAreaLineLayer()
搜索当前楼层的areaLineLayer
|
java.lang.String |
getCurrentFloorId()
获取当前楼层Id
|
protected Camera |
getDefaultCamera() |
protected FeatureLayer |
getLayerByFloorId(java.lang.String floorid)
根据楼层id搜索areaLayer
|
protected Layer |
getLayerByName(java.lang.String name)
搜索当前楼层Layer
|
protected java.util.List<Layer> |
getLayersByName(java.lang.String name)
搜索所有楼层Layer
|
Coordinate |
getMapCenter()
获取当前地图的中心点
|
Coordinate |
getMapCenterPoint()
获取当前view中心点的世界坐标
|
MapViewOption |
getMapViewOption()
获取地图手势option
MapViewOption |
Feature |
getNavigationLineFeature(int index)
获取某条导航线的数据
|
int |
getNavigationLineSize()
获取当前导航线的数量
|
protected NavigationLineLayer |
getNaviLineLayer()
获取导航层layer
|
double |
getRotate()
获得地图的角度
|
float |
getSkewAngle()
获取地图俯仰角度
|
double |
getZoomLevel()
获取缩放级别
|
void |
loadPlanarGraph(PlanarGraph planarGraph,
PlanarGraph f0PlanarGraph)
加载地图数据 不渲染
|
boolean |
loadplanarGraphComplete()
是否已经渲染完成
|
protected void |
move(float offsetX,
float offsetY) |
void |
moveToRect(Coordinate leftTop,
Coordinate rightBottom)
移动到某个区域 (地图会自动缩放到合适的大小)
|
void |
moveToRect(Coordinate leftTop,
Coordinate rightBottom,
int durationMs)
移动到某个区域 (地图会自动缩放到合适的大小)
|
void |
moveToRect(Coordinate leftTop,
Coordinate rightBottom,
int durationMs,
double minZoomLevel,
CameraAnimCallback callback)
移动到某个区域 (地图会自动缩放到合适的大小)
|
protected void |
onCameraChanged() |
void |
onDestroy() |
protected void |
onFirstRenderer() |
protected void |
onLayerAsyncLoadCompleted(java.lang.String layerName) |
void |
onLowMemory() |
void |
onPause() |
protected void |
onRenderCompleted(java.lang.String floorId)
地图渲染完成
|
protected void |
onRendererEnd() |
protected void |
onRendererStart() |
void |
onResume() |
boolean |
onTouchEvent(android.view.MotionEvent event) |
void |
queueEvent(java.lang.Runnable r) |
void |
refreshOverlay()
主动刷新overlay
|
void |
removeAllGeometryRenderer()
移除所有几何渲染元素
|
void |
removeAllModelRenderer()
移除所有模型渲染元素
|
void |
removeAllOverlay()
移除所有overlay
|
void |
removeAllRoadNetRenderer()
移除所有路网渲染元素
|
void |
removeGeometryRenderer(int id)
根据id移除所有的几何渲染元素
|
void |
removeModelRenderer(int rendererId)
根据id移除模型渲染元素
|
void |
removeNavigationLineById(java.lang.String id)
通过id删除符合的所有导航线(如果多条导航线id一致,将会全部被删除)
|
protected boolean |
removeNaviLineLayer()
删除导航层layer
用于导航线重复渲染达到宽度不随zoomlevel改变而改变
|
void |
removeOnFloorChangeListener(OnFloorChangeListener onFloorChangeListener)
移除地图楼层改变监听器
|
void |
removeOverlay(OverlayCell overlayCell)
移除一个overlay
|
void |
repeatAddNaviLineFeature(Feature feature,
NavigationLineLayer navigationLineLayer)
重复添加渲染导航线用于导航线重复渲染达到宽度不随zoomlevel改变而改变
|
void |
repeatRenderNaviLine(boolean repeat)
是否开启重复渲染导航线
|
void |
requestRender()
刷新地图 重新渲染一帧
|
void |
resetAllRendererColor()
重置所有poi的颜色
|
void |
resetRendererColor(java.lang.String... featureIds)
根据feature id重置部分poi的颜色
|
protected void |
rotate(float bearing) |
protected void |
runOnMainThread(java.lang.Runnable r) |
Coordinate |
screenCoordinate2WorldCoordinate(float screenX,
float screenY)
屏幕坐标转世界坐标
|
java.util.List<Feature> |
searchFeature(java.lang.String key,
java.lang.String val)
根据属性和值搜索当前楼层feature
|
java.util.List<Feature> |
searchFeatureByDisplay(java.lang.String val)
根据display搜索当前楼层feature
|
java.util.List<Feature> |
searchFeatureByDisplayWithAllFloors(java.lang.String val)
根据display搜索所有楼层feature
|
Feature |
searchFeatureById(java.lang.String id)
通过id搜索当前楼层feature
|
java.util.List<Feature> |
searchFeatureByIdWithAllFloors(java.lang.String id)
通过id搜索所有楼层feature
|
java.util.List<Feature> |
searchFeatureContainsVal(java.lang.String key,
java.lang.String val)
模糊查询 根据属性和值搜索当前楼层feature
|
java.util.List<Feature> |
searchFeatureContainsValWithAllFloors(java.lang.String key,
java.lang.String val)
模糊查询 根据属性和值搜索所有楼层feature
|
java.util.List<Feature> |
searchFeaturesByWorldCoordinate(Coordinate coordinate)
根据世界坐标搜索feature
|
java.util.List<Feature> |
searchFeaturesByWorldCoordinateWithFloorId(Coordinate coordinate,
java.lang.String floorId)
根据世界坐标搜索feature
|
java.util.List<Feature> |
searchFeatureWithAllFloors(java.lang.String key,
java.lang.String val)
根据属性和值搜索所有楼层feature
|
Feature |
searchRoadNetLineFeatureByWorldCoordinate(Coordinate coordinate,
double distance)
查找路网线feature
|
Feature |
searchRoadNetPointFeatureByWorldCoordinate(Coordinate coordinate,
double distance)
查找路网点feature
|
void |
set2dMode()
设置2d模式
|
void |
set3dMode(double skewAngle)
设置3d模式
|
void |
setCompassImage(android.graphics.Bitmap bitmap) |
void |
setCompassView(ICompassView compassView) |
void |
setDefaultSkewAngle(float defaultSkewAngle)
设置地图加载时默认的俯仰角度
|
void |
setEnableMove(boolean isEnable)
是否支持地图平移
|
void |
setEnableRotate(boolean isEnable)
是否支持地图旋转
|
void |
setEnableScale(boolean isEnable)
是否支持地图缩放
|
void |
setEnableSkew(boolean isEnable)
是否支持地图倾斜
|
void |
setFloorView(IFloorView floorView) |
void |
setFPSEvent(FPSEvent fpsEvent) |
void |
setInitEvent(OnInitEvent onInitEvent)
地图初始化的事件
|
void |
setLayerVisibility(java.lang.String layerName,
boolean visibility)
设置图层的可用性
|
void |
setLimitRatio(float limitRatio)
设置地图加载时默认的屏占比,默认值0.667
|
void |
setLogoPosition(float x,
float y)
设置logo的位置
|
void |
setMapBounds(Coordinate leftTop,
Coordinate rightBottom)
设置相机界限
|
void |
setMapUIController(IMapUIController mapUIController) |
void |
setMapViewOption(MapViewOption option)
设置地图手势option
MapViewOption |
void |
setNaviLineFactor(float factor) |
void |
setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener)
设置地图双击事件监听器
|
void |
setOnLongPressListener(OnLongPressListener onLongPressListener)
设置地图长按事件监听器
|
void |
setOnMapLoadedListener(OnMapLoadedListener mapLoadedListener)
地图加载完成的事件
|
void |
setOnMapMoveListener(OnMapMoveListener onMapMoveListener)
设置地图移动事件监听器
|
void |
setOnMapRotateChangedListener(OnMapRotateChangedListener onMapRotateChangedListener)
设置地图旋转监听器
|
void |
setOnMapScaleChangedListener(OnMapScaleChangedListener onMapScaleChangedListener)
设置地图缩放监听器
|
void |
setOnMapSkewChangedListener(OnMapSkewChangedListener onMapSkewChangedListener)
设置地图俯仰监听器
|
void |
setOnNaviLineRepeatRenderListener(OnNaviLineRepeatRenderListener naviLineRepeatRendererListener)
注册重复渲染导航线listener
|
void |
setOnRenderEvent(OnRenderEvent onRenderEvent)
地图渲染完成事件
|
void |
setOnSingleTapListener(OnSingleTapListener onSingleTapListener)
设置地图单击事件监听器
|
void |
setOverlayContainer(android.view.ViewGroup container)
设置overlay的容器
|
void |
setScaleView(IScaleView scaleView) |
void |
setZoomView(IZoomView zoomView) |
protected void |
skew(float angle) |
void |
submitCircleRenderer(int id,
Coordinate center,
double r,
int color,
float lineWidth)
提交一个圆形渲染元素
|
void |
submitFillCircleRenderer(int id,
Coordinate center,
double r,
int color,
int fillColor,
float lineWidth)
提交一个实心圆形渲染元素
|
void |
submitFillPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
int fillColor,
float lineWidth)
提交一个实心多边形渲染元素
|
void |
submitPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
float lineWidth)
提交一个多边形渲染元素
|
void |
submitRoadNetRenderer(FeatureCollection featureCollection,
int color,
float pointSize)
添加路网渲染元素
|
void |
submitSymbolRenderRule(SymbolRenderRule rule)
提交Symbol渲染规则
|
void |
submitSymbolRenderRule(SymbolRenderRuleII rule)
提交Symbol渲染规则
|
void |
updateModelRendererOption(int rendererId,
ModelRenderOption option)
更新某个模型渲染元素的模型矩阵
|
void |
updateRendererColor(java.util.HashMap<java.lang.String,java.lang.Integer> value)
批量修改poi的颜色
|
void |
updateRendererColor(int color,
java.lang.String... featureIds)
批量修改poi的颜色(同一个颜色)
|
void |
updateRendererColor(java.lang.String featureId,
int color)
当一修改poi的颜色
|
void |
updateRenderersTextsize(java.lang.String layerName,
int textsize) |
void |
updateRendererText(java.lang.String layerName,
java.util.Map<java.lang.String,java.lang.String> idTextMap)
更新poi文字
|
void |
updateRendererText(java.lang.String layerName,
java.lang.String featureId,
java.lang.String text)
更新poi的文字
|
void |
updateRoadNetRendererColor(java.lang.String key,
java.lang.Object value,
int color)
更新路网渲染元素的颜色
|
Coordinate |
worldCoordinate2ScreenCoordinate(Coordinate coordinate)
世界坐标转屏幕坐标
|
protected void |
zoom(float offsetZ) |
void |
zoomIn()
放大一个级别
|
void |
zoomOut()
缩小一个级别
|
finalize, getDebugFlags, getPreserveEGLContextOnPause, getRenderMode, onAttachedToWindow, onDetachedFromWindow, setDebugFlags, setEGLConfigChooser, setEGLConfigChooser, setEGLConfigChooser, setEGLContextClientVersion, setEGLContextFactory, setEGLWindowSurfaceFactory, setGLWrapper, setPreserveEGLContextOnPause, setRenderer, setRenderMode, surfaceChanged, surfaceCreated, surfaceDestroyed, surfaceRedrawNeeded, surfaceRedrawNeededAsyncdispatchDraw, draw, gatherTransparentRegion, getHolder, getSurfaceControl, onMeasure, onWindowVisibilityChanged, setSecure, setVisibility, setZOrderMediaOverlay, setZOrderOnTopaddChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, addTouchables, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableHotspotChanged, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityClassName, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, jumpDrawablesToCurrentState, keyboardNavigationClusterSearch, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreDefaultFocus, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDrawprotected final java.util.concurrent.atomic.AtomicBoolean loadingPlanarGraph
protected final java.util.concurrent.atomic.AtomicBoolean mapViewDestroyed
protected float limitRatio
protected int animationDurationTexture
protected float defaultSkewAngle
protected float naviLineFactor
protected OnRenderEvent onRenderEvent
protected android.os.Handler mainThreadHandler
protected OnNaviLineRepeatRenderListener mNaviLineRepeatRenderListener
protected boolean repeatRenderNaviLine
public MapView(android.content.Context context)
public MapView(android.content.Context context,
android.util.AttributeSet attrs)
public MapView(java.lang.String name,
android.content.Context context)
public MapView(java.lang.String name,
android.content.Context context,
android.util.AttributeSet attrs)
public void onDestroy()
protected void onCameraChanged()
protected void onFirstRenderer()
protected void onLayerAsyncLoadCompleted(java.lang.String layerName)
public MapViewOption getMapViewOption()
MapViewOptionpublic void setMapViewOption(@NonNull
MapViewOption option)
MapViewOptionoption - public void setEnableMove(boolean isEnable)
isEnable - public void setEnableRotate(boolean isEnable)
isEnable - public void setEnableScale(boolean isEnable)
isEnable - public void setEnableSkew(boolean isEnable)
isEnable - public Feature searchFeatureById(@NonNull java.lang.String id)
id - public java.util.List<Feature> searchFeatureByIdWithAllFloors(@NonNull java.lang.String id)
id - public java.util.List<Feature> searchFeature(@NonNull java.lang.String key, @NonNull java.lang.String val)
key - val - public java.util.List<Feature> searchFeatureWithAllFloors(@NonNull java.lang.String key, @NonNull java.lang.String val)
key - val - public java.util.List<Feature> searchFeatureContainsVal(@NonNull java.lang.String key, @NonNull java.lang.String val)
key - val - public java.util.List<Feature> searchFeatureContainsValWithAllFloors(@NonNull java.lang.String key, @NonNull java.lang.String val)
key - val - public java.util.List<Feature> searchFeatureByDisplay(@NonNull java.lang.String val)
val - public java.util.List<Feature> searchFeatureByDisplayWithAllFloors(@NonNull java.lang.String val)
val - public java.util.List<Feature> searchFeaturesByWorldCoordinate(Coordinate coordinate)
coordinate - public java.util.List<Feature> searchFeaturesByWorldCoordinateWithFloorId(Coordinate coordinate, java.lang.String floorId)
coordinate - public double getRotate()
public float getSkewAngle()
public Coordinate getMapCenter()
public Coordinate getMapCenterPoint()
public double getZoomLevel()
public java.lang.String getCurrentFloorId()
public boolean checkInitCompleted()
public void setInitEvent(OnInitEvent onInitEvent)
onInitEvent - public void setOnMapLoadedListener(OnMapLoadedListener mapLoadedListener)
public void setOnRenderEvent(OnRenderEvent onRenderEvent)
onRenderEvent - public void setDefaultSkewAngle(float defaultSkewAngle)
defaultSkewAngle - public void setMapBounds(Coordinate leftTop, Coordinate rightBottom)
leftTop - rightBottom - public void setLayerVisibility(@NonNull
java.lang.String layerName,
@NonNull
boolean visibility)
layerName - visibility - public void setLimitRatio(float limitRatio)
limitRatio - 该参数必须为非负数public Coordinate screenCoordinate2WorldCoordinate(float screenX, float screenY)
screenX - screenY - public Coordinate worldCoordinate2ScreenCoordinate(Coordinate coordinate)
coordinate - public int getNavigationLineSize()
public Feature getNavigationLineFeature(int index)
index - public void addNavigationLineFeature(FeatureCollection featureCollection)
featureCollection - feature的id可用于删除这些条导航线public void repeatAddNaviLineFeature(Feature feature, NavigationLineLayer navigationLineLayer)
public void setNaviLineFactor(float factor)
public void addNavigationLineFeature(FeatureCollection featureCollection, java.lang.String styleName)
featureCollection - styleName - public void clearAllNavigationLineFeature()
public void removeNavigationLineById(java.lang.String id)
id - public void zoomIn()
public void zoomOut()
public void moveToRect(Coordinate leftTop, Coordinate rightBottom)
leftTop - 左上角rightBottom - 右下角public void moveToRect(Coordinate leftTop, Coordinate rightBottom, int durationMs)
leftTop - 左上角rightBottom - 右下角durationMs - 动画时长public void moveToRect(Coordinate leftTop, Coordinate rightBottom, int durationMs, double minZoomLevel, CameraAnimCallback callback)
leftTop - 左上角rightBottom - 右下角durationMs - 动画时长minZoomLevel - 最小的缩放级别@UiThread public final void animateCamera(CameraUpdate update)
update - @UiThread public final void animateCamera(CameraUpdate update, CameraAnimCallback callback)
@UiThread public final void animateCamera(CameraUpdate update, int durationMs, CameraAnimCallback callback)
@UiThread public final void animateCameraGesture(CameraUpdate update)
update - @UiThread public final void animateCameraGesture(CameraUpdate update, int durationMs, CameraAnimCallback callback)
protected void move(float offsetX,
float offsetY)
protected void zoom(float offsetZ)
protected void skew(float angle)
protected void rotate(float bearing)
public void setFPSEvent(FPSEvent fpsEvent)
public void setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener)
onDoubleTapListener - public void setOnLongPressListener(OnLongPressListener onLongPressListener)
onLongPressListener - public void setOnMapScaleChangedListener(OnMapScaleChangedListener onMapScaleChangedListener)
onMapScaleChangedListener - public void setOnMapRotateChangedListener(OnMapRotateChangedListener onMapRotateChangedListener)
onMapRotateChangedListener - public void setOnMapSkewChangedListener(OnMapSkewChangedListener onMapSkewChangedListener)
onMapSkewChangedListener - public void addOnFloorChangeListener(OnFloorChangeListener onFloorChangeListener)
onFloorChangeListener - public void removeOnFloorChangeListener(OnFloorChangeListener onFloorChangeListener)
onFloorChangeListener - public void setOnSingleTapListener(OnSingleTapListener onSingleTapListener)
onSingleTapListener - public void setOnMapMoveListener(OnMapMoveListener onMapMoveListener)
onMapMoveListener - public void setOverlayContainer(android.view.ViewGroup container)
public <T extends OverlayCell> T addOverlay(T overlayCell)
overlayCell - 覆盖物,可参考SimpleImageMarker
SimpleTextMarkerpublic void setLogoPosition(float x,
float y)
x - 屏幕坐标xy - 屏幕坐标ypublic void removeAllOverlay()
public void removeOverlay(OverlayCell overlayCell)
overlayCell - 覆盖物,可参考SimpleImageMarker
SimpleTextMarkerpublic void refreshOverlay()
public void drawPlanarGraph(PlanarGraph planarGraph)
planarGraph - 地图数据public void drawPlanarGraph(PlanarGraph planarGraph, PlanarGraph f0PlanarGraph)
planarGraph - 地图数据public void drawPlanarGraph(PlanarGraph planarGraph, PlanarGraph f0PlanarGraph, boolean resetCamera)
planarGraph - 地图数据resetCamera - 是否把相机重置public boolean loadplanarGraphComplete()
public void loadPlanarGraph(PlanarGraph planarGraph, PlanarGraph f0PlanarGraph)
planarGraph - 地图数据public void requestRender()
public void changeBackgroundColor(int color)
color - 颜色值public void changeBackgroundImage(@DrawableRes
int res)
enableBackgroundImage().res - 图片资源idpublic void enableBackgroundImage()
public void disableBackgroundImage()
public void enableLogo()
public void disableLogo()
public void submitPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
float lineWidth)
id - 渲染元素的id 可以依据这个id删除它coordinates - 首尾封闭的点序列color - 颜色lineWidth - 线宽public void submitCircleRenderer(int id,
Coordinate center,
double r,
int color,
float lineWidth)
id - center - 圆心坐标 (世界坐标)r - 半径 (米)color - 颜色lineWidth - 线宽(像素)public void submitFillPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
int fillColor,
float lineWidth)
id - 渲染元素的id 可以依据这个id删除它coordinates - 首尾封闭的点序列color - 颜色fillColor - 填充颜色lineWidth - 线宽public void submitFillCircleRenderer(int id,
Coordinate center,
double r,
int color,
int fillColor,
float lineWidth)
id - center - 圆心坐标 (世界坐标)r - 半径 (米)color - 颜色fillColor - 填充颜色lineWidth - 线宽(像素)public void removeAllGeometryRenderer()
public void removeGeometryRenderer(int id)
id - public void set2dMode()
public void set3dMode(double skewAngle)
skewAngle - 俯仰角度public void updateRendererColor(@NonNull
java.lang.String featureId,
int color)
featureId - color - public void updateRendererColor(int color,
@NonNull
java.lang.String... featureIds)
color - featureIds - public void updateRendererColor(java.util.HashMap<java.lang.String,java.lang.Integer> value)
value - key: poiId val : 颜色public void resetRendererColor(@NonNull
java.lang.String... featureIds)
featureIds - public void resetAllRendererColor()
public void updateRenderersTextsize(java.lang.String layerName,
int textsize)
public void updateRendererText(java.lang.String layerName,
java.lang.String featureId,
java.lang.String text)
layerName - featureId - public void updateRendererText(java.lang.String layerName,
java.util.Map<java.lang.String,java.lang.String> idTextMap)
layerName - idTextMap - key: featureId value: textpublic void submitSymbolRenderRule(SymbolRenderRule rule)
rule--Visibility - public void submitSymbolRenderRule(SymbolRenderRuleII rule)
rule--isAlwaysRender - public void setMapUIController(IMapUIController mapUIController)
public void enableZoomView(boolean isEnable)
public void enableCompass(boolean isEnable)
public void enableScaleView(boolean isEnable)
public void enableFloorView(boolean isEnable)
public void setCompassView(ICompassView compassView)
public void setScaleView(IScaleView scaleView)
public void setZoomView(IZoomView zoomView)
public void setFloorView(IFloorView floorView)
public void setCompassImage(android.graphics.Bitmap bitmap)
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent 在类中 android.view.Viewpublic Feature searchRoadNetPointFeatureByWorldCoordinate(Coordinate coordinate, double distance)
coordinate - public Feature searchRoadNetLineFeatureByWorldCoordinate(Coordinate coordinate, double distance)
coordinate - public void submitRoadNetRenderer(FeatureCollection featureCollection, int color, float pointSize)
featureCollection - public void updateRoadNetRendererColor(java.lang.String key,
java.lang.Object value,
int color)
key - 使用哪个key进行比对value - 对应的值color - 颜色值public void removeAllRoadNetRenderer()
public void addModelRenderer(int id,
IModelLoader.FileType fileType,
java.lang.String filePath,
java.lang.String fileName,
boolean merger,
ModelRenderOption option)
id - 模型分组idfileType - 文件类型 asstes或者sdCardfilePath - 文件路径fileName - 文件名merger - 是否合并三角网渲染option - 模型渲染参数public void updateModelRendererOption(int rendererId,
ModelRenderOption option)
rendererId - option - public void removeModelRenderer(int rendererId)
rendererId - public void removeAllModelRenderer()
public void setOnNaviLineRepeatRenderListener(OnNaviLineRepeatRenderListener naviLineRepeatRendererListener)
public void repeatRenderNaviLine(boolean repeat)
protected void runOnMainThread(java.lang.Runnable r)
public void queueEvent(java.lang.Runnable r)
queueEvent 在类中 android.opengl.GLSurfaceViewprotected void onRendererStart()
protected void onRendererEnd()
protected void onRenderCompleted(java.lang.String floorId)
floorId - protected Coordinate _getMapCenter()
protected java.lang.String _getCurrentFloorId()
protected boolean _checkInitCompleted()
protected void _drawPlanarGraph(PlanarGraph planarGraph, PlanarGraph f0PlanarGraph, boolean resetCamera)
planarGraph - protected void _loadPlanarGraph(PlanarGraph planarGraph, PlanarGraph f0PlanarGraph)
public void onResume()
onResume 在类中 android.opengl.GLSurfaceViewpublic void onPause()
onPause 在类中 android.opengl.GLSurfaceViewpublic void onLowMemory()
protected Camera getDefaultCamera()
protected void _setFPSEvent(FPSEvent event)
protected void _setMapBounds(CameraBounds cameraBounds)
protected void _setInitEvent(OnInitEvent onInitEvent)
onInitEvent - protected void _setOnMapLoadedListener(OnMapLoadedListener mapLoadedListener)
protected void _setRenderEvent(OnRenderEvent onRenderEvent)
onRenderEvent - protected void _setLayerVisibility(java.lang.String layerName,
boolean visibility)
layerName - visibility - protected int _getNavigationLineSize()
protected Feature _getNavigationLineFeature(int index)
index - protected void _addNavigationLineFeature(MapView mapView, Feature feature, java.lang.String styleName)
feature - styleName - protected void _repeatAddNaviLineFeature(MapView mapView, Feature feature, NavigationLineLayer naviLineLayer)
protected void _setNaviLineFactor(float naviLineFactor)
protected void _setOnNaviLineRepeatRenderListener(OnNaviLineRepeatRenderListener naviLineRepeatRendererListener)
protected void _repeatRenderNaviLine(boolean repeat)
protected void _repeatRenderNaviLine()
protected void _clearAllNavigationLineFeature()
protected void _removeNavigationLineById(java.lang.String id)
id - protected Coordinate _screenCoordinate2WorldCoordinate(float screenX, float screenY)
screenX - screenY - protected Coordinate _worldCoordinate2ScreenCoordinate(Coordinate coordinate)
coordinate - protected void _changeBackgroundColor(int color)
color - protected void _changeBackgroundImage(@DrawableRes
int res)
_enableBackgroundImage().res - protected void _enableBackgroundImage()
protected void _disableBackgroundImage()
protected void _disableLogo()
protected void _enableLogo()
protected void _setLogoPosition(float x,
float y)
protected void _submitPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
float lineWidth)
id - 渲染元素的id 可以依据这个id删除它coordinates - color - lineWidth - protected void _submitCircleRenderer(int id,
Coordinate center,
double r,
int color,
float lineWidth)
id - center - r - color - lineWidth - protected void _submitFillPolygonRenderer(int id,
Coordinate[] coordinates,
int color,
int fillColor,
float lineWidth)
id - 渲染元素的id 可以依据这个id删除它coordinates - color - fillColor - lineWidth - protected void _submitFillCircleRenderer(int id,
Coordinate center,
double r,
int color,
int fillColor,
float lineWidth)
id - center - r - color - fillColor - lineWidth - protected void _removeAllGeometryRenderer()
protected void _removeGeometryRenderer(int id)
id - @UiThread protected final void _animateCamera(CameraUpdate update, int durationMs, CameraAnimCallback callback)
@UiThread protected final void _animateCameraGesture(CameraUpdate update, int durationMs, CameraAnimCallback callback)
protected Layer getLayerByName(java.lang.String name)
name - layer名称protected java.util.List<Layer> getLayersByName(java.lang.String name)
name - layer名称protected FeatureLayer getAreaLayer()
protected FeatureLayer getLayerByFloorId(java.lang.String floorid)
protected FeatureLineLayer getAreaLineLayer()
protected java.util.List<FeatureLayer> getAreaLayers()
protected NavigationLineLayer getNaviLineLayer()
protected boolean removeNaviLineLayer()
protected void addNaviLineLayer()
protected double _getZoomLevel()
protected void doCollisionDetection()
public void doCollisionDetectionWithAnimator()
protected void _addModelRenderer(int id,
IModelLoader.FileType fileType,
java.lang.String filePath,
java.lang.String fileName,
boolean merger,
ModelRenderOption option)
id - 模型分组idfileType - 文件类型 asstes或者sdCardfilePath - 文件路径fileName - 文件名merger - 是否合并三角网渲染option - 模型渲染参数protected void _removeModelRenderer(int rendererId)
rendererId - protected void _removeAllModelRenderer()
protected void _updateModelRendererOption(int rendererId,
ModelRenderOption option)
rendererId - option - protected void _submitRoadNetRenderer(FeatureCollection featureCollection, int color, float pointSize)
protected void _removeAllRoadNetRenderer()
protected void _updateRoadNetRendererColor(java.lang.String key,
java.lang.Object val,
int color)
protected Feature _searchRoadNetPointFeatureByWorldCoordinate(Coordinate coordinate, double distance)
protected Feature _searchRoadNetLineFeatureByWorldCoordinate(Coordinate coordinate, double distance)
protected void _moveToRect(Coordinate leftTop, Coordinate rightBottom, int durationMs, double minZoomLevel, CameraAnimCallback callback)
protected Coordinate _getMapCenterPoint()