public class MapView extends GLMapSurfaceView
| Modifier and Type | Class and Description |
|---|---|
static class |
MapView.RasterMode
Raster Modes supported by the mapView API
|
static class |
MapView.RenderMode
The Enum for the rendering modes supported by mapView
|
static class |
MapView.TouchMode
The Enum defining the touch mode supported by mapView
|
GLMapSurfaceView.MapColor, GLMapSurfaceView.RouteRenderStyle, GLMapSurfaceView.TouchEventandroid.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.OnAttachStateChangeListener, android.view.View.OnClickListener, 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.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListenerDEBUG_CHECK_GL_ERROR, DEBUG_LOG_GL_CALLS, RENDERMODE_CONTINUOUSLY, RENDERMODE_WHEN_DIRTYACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, 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, 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, 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, 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, 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_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_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y| Constructor and Description |
|---|
MapView(android.content.Context context)
This is the class' default constructor.
|
MapView(android.content.Context context,
android.util.AttributeSet attrs)
This is the constructor used by the system when creating MapView from an XML layout file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activatePopup(Popup popup)
This method is used to set the custom popup.
|
long |
addAnnotation(Annotation annotation)
This method is used to add an annotation to the map view
|
OverlayId |
addOverLay(Overlay overlay)
This method is used to add an overlay to the map view.
|
float |
calculateZoom(ArrayList<Annotation> annotations,
Annotation centerAnno)
This method is used to calculate the zoom level at which to show the annotations.
|
void |
disableAllAnnotationLayers()
This method is used to disable all annotation layers at once.
|
void |
disableAnnotationLayer(Annotation.AnnotationLayer layer)
This method is used to disable an annotation layer.
|
void |
disableAnnotationLayers(ArrayList<Annotation.AnnotationLayer> layers)
This method is used to disable a list of specific annotation layers at once.
|
void |
enableAnnotationLayer(Annotation.AnnotationLayer layer)
This method is used to enable an annotation layer.
|
void |
enableAnnotationLayers(ArrayList<Annotation.AnnotationLayer> layers)
This method is used to enable a list of annotation layers.
|
void |
followVehicle(boolean follow)
This method is used to configure the camera to follow the vehicle moving.
|
android.location.Location |
getCameraLocation()
This method is used to get the camera location.
|
android.location.Location |
getLocationForScreenPoint(android.graphics.Point point)
This method is used to get information for the screen location
|
byte[] |
getSnapShot(int x,
int y,
int width,
int height)
This method is used to get a bitmap snapshot for the current map view window.
|
MapView.TouchMode |
getTouchMode()
This method is used to get the touch mode of the current map view.
|
boolean |
getUseMetricUnits()
This method is used to get the current configuration of the unit system.
|
float |
getZoomLevel()
This method is used to get the current zoom level as a float value.
|
boolean |
hideAnnotation(Annotation annotation)
This method is used to hide an annotation on screen.
|
boolean |
isNightMode()
This method is used to get the current display mode.
|
void |
loadConfiguration(String configFile)
This method is used to load a new configuration file specified by user.
|
void |
loadConfigurationForTvOut(String configFile)
This method is used to load a new configuration file for TV out specified by user.
|
void |
loadConfigurations(ArrayList<String> configFiles)
This method is used to load the list of configurations specified by user.
|
void |
lookAt(ArrayList<Annotation> annotations)
This method is used to configure the camera to show the annotations on the screen.
|
void |
lookAt(double north,
double west,
double south,
double east)
This method is used to configure the map view camera to look at the boundary.
|
void |
lookAt(android.location.Location location)
This method is used to change the camera configuration.
|
void |
removeAllAnnotation()
This method is used to remove all annotations.
|
void |
removeAnnotation(Annotation annotation)
This method is used to remove the annotation from the map view
|
void |
removeOverLay(OverlayId ids)
This method is used to remove an overlay by the overlay Id.
|
void |
removePopup()
This method is used to remove the custom popup.
|
void |
setDisplaySpeedTraps(boolean enable)
This method is used to turn on or off speed traps information.
|
void |
setDisplayTraffic(boolean enable)
This method is used to turn on or off the traffic information.
|
void |
setDisplayTrafficCameras(boolean enable)
This method is used to turn on or off traffic camera information.
|
void |
setDisplayTrafficIncidents(boolean enable)
This method is used to turn on or off the traffic incidents information.
|
void |
setDisplayVehicle(boolean enable)
This method is used to turn on or off vehicle visibility.
|
void |
setNightMode(boolean nightMode)
This method is used to configure the map view style to night mode or day mode.
|
void |
setRasterMode(MapView.RasterMode mode)
This method is used to configure the map raster mode.
|
void |
setRenderMode(MapView.RenderMode mode)
This method is used to change the render mode.
|
static void |
setServerUrl(String vectorTileUrl,
String vectorTileUrlParams,
String trafficTileUrl,
String trafficTileUrlParams)
This method is used to set the base URL/parameters for vector map/traffic tile server.
|
void |
setTouchMode(MapView.TouchMode mode)
This method is used to configure the touch mode of the map view.
|
void |
setUseMetricUnits(Boolean useMetric)
This method is used to change the configuration of the unit system.
|
long |
setVehicle2D(Annotation annotation)
This method is used to change the vehicle style in 2D mode.
|
long |
setVehicle3D(String modelName)
This method is used to configure the vehicle texture in 3D mode.
|
void |
setVehiclePosition(android.location.Location l)
This method is used to configure the vehicle location.
|
void |
setViewConfigPrefix(String configPrefix)
This method is used to set the configuration prefix which is possible to append to configuration path.
|
void |
setZoomLevel(float zoom,
boolean needTransition)
This method is used to configure the map view zoom level.
|
boolean |
showAnnotation(Annotation annotation)
This method is used to show the annotation on screen.
|
void |
showCopyRight(int x,
int y,
int pixelWidth,
int pixelHeight)
This method is used to configure the copyright information location.
|
Annotation.AnnotationLayer |
unusedAnnotationLayer()
This method is used to get an unused annotation layer.
|
void |
updateAnnotationLocation(Annotation annotation)
This method is used to update annotation information.
|
addAnnotation, addOverlay, calculateRegion, clearRoute, disableTouch, getAnnotations, getBitmapSnapshot, getCameraDeclination, getEngineBooleanFlag, getGLRenderMode, getHighlightAnnotationId, getLatLon, getMapColor, getMapListener, getModelVehicleAnnotationId, getMultiTouchMode, getSpriteVehicleAnnotationId, hideTurnArrow, init, init, init, init, isOnRoad, isTouchDisabled, isTurnRouteBoundValid, moveTo, onDestroy, onDetachedFromWindow, onPause, onResume, onTouchEvent, refreshMapData, removeAnnotation, removeOverlay, setAdi, setCameraDeclination, setEngineBooleanFlag, setHighlightAnnotation, setLocation, setMapColor, setMapListener, setMultiTouchMode, setRasterMode, setRenderMode, setShowSky, setTurnRouteZoomLevel, setVehicle3D, setVehicleLocation, setVisibility, showRegion, showRegion, showTurnArrow, showTurnRouteSummaryfinalize, getDebugFlags, getPreserveEGLContextOnPause, getRenderMode, onAttachedToWindow, queueEvent, requestRender, setDebugFlags, setEGLConfigChooser, setEGLConfigChooser, setEGLConfigChooser, setEGLContextClientVersion, setEGLContextFactory, setEGLWindowSurfaceFactory, setGLWrapper, setPreserveEGLContextOnPause, setRenderer, setRenderMode, surfaceChanged, surfaceCreated, surfaceDestroyeddispatchDraw, draw, gatherTransparentRegion, getHolder, onMeasure, onWindowVisibilityChanged, setSecure, setZOrderMediaOverlay, setZOrderOnTopaddChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onOverScrolled, onPopulateAccessibilityEvent, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawpublic MapView(android.content.Context context)
context - the owner context; used to retrieve a resource from the contextpublic MapView(android.content.Context context,
android.util.AttributeSet attrs)
context - the owner context used to retrieve a resourceattrs - the XML attributes defined in the layout filepublic android.location.Location getCameraLocation()
getCameraLocation in class GLMapSurfaceViewpublic android.location.Location getLocationForScreenPoint(android.graphics.Point point)
point - the x,y offset on the map viewpublic void removeAnnotation(Annotation annotation)
removeAnnotation in class GLMapSurfaceViewannotation - the annotation you want removepublic long addAnnotation(Annotation annotation)
Note: If you want to remove it later, keep a reference of this annotation.
addAnnotation in class GLMapSurfaceViewannotation - the annotation you want to addpublic void updateAnnotationLocation(Annotation annotation)
Note: if you want to change an attribute of the annotation, change the attribute first, and then call this method to update the information on the map view.
annotation - the annotation you want updatepublic boolean showAnnotation(Annotation annotation)
showAnnotation in class GLMapSurfaceViewannotation - the annotation you want to show on the screenpublic boolean hideAnnotation(Annotation annotation)
hideAnnotation in class GLMapSurfaceViewannotation - the annotation you want to hide from the screenpublic void setNightMode(boolean nightMode)
nightMode - to use night mode or notpublic boolean isNightMode()
public void setRasterMode(MapView.RasterMode mode)
mode - a value of the RasterMode EnumMapView.RasterModepublic void lookAt(ArrayList<Annotation> annotations)
The camera will automatically zoom in or out to make all annotations available on the screen.
annotations - an array of annotations you want show
.public float calculateZoom(ArrayList<Annotation> annotations, Annotation centerAnno)
calculateZoom in class GLMapSurfaceViewannotations - an array of annotation you want to be available on the screencenterAnno - the annotation you want display in the centerpublic void lookAt(android.location.Location location)
location - the location you want show in the center of the mappublic void lookAt(double north,
double west,
double south,
double east)
north - the most northwardwest - the most westwardsouth - the most southwardeast - the most eastwardpublic void setDisplayTraffic(boolean enable)
setDisplayTraffic in class GLMapSurfaceViewenable - boolean value, to enable traffic or notpublic void setDisplayTrafficIncidents(boolean enable)
setDisplayTrafficIncidents in class GLMapSurfaceViewenable - boolean value, to enable incidents information or notpublic void setDisplayTrafficCameras(boolean enable)
setDisplayTrafficCameras in class GLMapSurfaceViewenable - boolean value, to enable traffic camera information or notpublic void setDisplaySpeedTraps(boolean enable)
setDisplaySpeedTraps in class GLMapSurfaceViewenable - boolean value, to enable speed traps information or notpublic void setDisplayVehicle(boolean enable)
setDisplayVehicle in class GLMapSurfaceViewenable - to show vehicle icon or notpublic void followVehicle(boolean follow)
followVehicle in class GLMapSurfaceViewfollow - boolean value, to follow the vehicle or notpublic long setVehicle2D(Annotation annotation)
setVehicle2D in class GLMapSurfaceViewannotation - using the configuration of the annotation to show the vehiclepublic long setVehicle3D(String modelName)
setVehicle3D in class GLMapSurfaceViewmodelName - the name of the 3D model file. That file must be placed in the correct path.
For the path information, see the Developer Documentation.public void setVehiclePosition(android.location.Location l)
l - the location at which you want to place the vehiclepublic void setRenderMode(MapView.RenderMode mode)
mode - one of the RenderMode Enum valuespublic OverlayId addOverLay(Overlay overlay)
overlay - the overlay you want to add to the map view.
Note: Before adding an overlay, you mush configure it.
public void removeAllAnnotation()
removeAllAnnotation in class GLMapSurfaceViewpublic void removeOverLay(OverlayId ids)
ids - the id of the overlay you want to removepublic byte[] getSnapShot(int x,
int y,
int width,
int height)
x - the origin x of the windowy - the origin y of the windowwidth - the width of the windowheight - the height of the windowpublic void setTouchMode(MapView.TouchMode mode)
mode - a value of the TouchMode Enumpublic final MapView.TouchMode getTouchMode()
public void setUseMetricUnits(Boolean useMetric)
useMetric - boolean value, to use metric values or notpublic boolean getUseMetricUnits()
public float getZoomLevel()
getZoomLevel in class GLMapSurfaceViewpublic void setZoomLevel(float zoom,
boolean needTransition)
setZoomLevel in class GLMapSurfaceViewzoom - the zoom level you want to setneedTransition - boolean value, to use transition animation or notpublic void showCopyRight(int x,
int y,
int pixelWidth,
int pixelHeight)
showCopyRight in class GLMapSurfaceViewx - original x locationy - original y locationpixelWidth - width of the copyright boxpixelHeight - height of the copyright boxpublic Annotation.AnnotationLayer unusedAnnotationLayer()
unusedAnnotationLayer in class GLMapSurfaceViewpublic void enableAnnotationLayer(Annotation.AnnotationLayer layer)
enableAnnotationLayer in class GLMapSurfaceViewlayer - the annotation layer to enablepublic void enableAnnotationLayers(ArrayList<Annotation.AnnotationLayer> layers)
enableAnnotationLayers in class GLMapSurfaceViewlayers - the list of annotation layers to enablepublic void disableAnnotationLayer(Annotation.AnnotationLayer layer)
disableAnnotationLayer in class GLMapSurfaceViewlayer - the annotation layer to disablepublic void disableAnnotationLayers(ArrayList<Annotation.AnnotationLayer> layers)
disableAnnotationLayers in class GLMapSurfaceViewlayers - the list of annotation layers to disablepublic void disableAllAnnotationLayers()
disableAllAnnotationLayers in class GLMapSurfaceViewpublic void loadConfiguration(String configFile)
loadConfiguration in class GLMapSurfaceViewconfigFile - the configuration file name to load.public void loadConfigurations(ArrayList<String> configFiles)
loadConfigurations in class GLMapSurfaceViewconfigFiles - the list of configuration file names to load.public void loadConfigurationForTvOut(String configFile)
loadConfigurationForTvOut in class GLMapSurfaceViewconfigFile - the configuration file name for TV out to load.public void setViewConfigPrefix(String configPrefix)
setViewConfigPrefix in class GLMapSurfaceViewconfigPrefix - the possible prefix to append to configuration path.public static void setServerUrl(String vectorTileUrl, String vectorTileUrlParams, String trafficTileUrl, String trafficTileUrlParams)
vectorTileUrl - the base URL for vector map tile server.vectorTileUrlParams - the parameters for vector map tile server.trafficTileUrl - the base URL for traffic tile server.trafficTileUrlParams - the parameters for traffic tile server.public void activatePopup(Popup popup)
activatePopup in class GLMapSurfaceViewpopup - the custom popup instance created by user.public void removePopup()
removePopup in class GLMapSurfaceView