public class GLMapView
extends android.view.SurfaceView
implements android.view.SurfaceHolder.Callback, android.view.TextureView.SurfaceTextureListener
GLMapView is a custom SurfaceView that renders and presents vector map| Modifier and Type | Class and Description |
|---|---|
static interface |
GLMapView.AnimateCallback
Called to configure animation.
|
static interface |
GLMapView.GLMapPlacement |
static interface |
GLMapView.GLMapTileState |
static interface |
GLMapView.GLUnitSystem |
static interface |
GLMapView.ResourceLoadCallback
Called when GLMapView need to load some image
|
static interface |
GLMapView.ScreenCaptureCallback
Called when GLMapView finished rendering map and text to Bitmap
|
static interface |
GLMapView.ScreenCaptureRawCallback
Called when GLMapView finished rendering map and text to raw data
|
android.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| Modifier and Type | Field and Description |
|---|---|
ImageManager |
imageManager |
float |
screenScale |
ACCESSIBILITY_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, 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, 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, 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, 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, VISIBLE, X, Y, Z| Constructor and Description |
|---|
GLMapView(android.content.Context context)
Creates map view
|
GLMapView(android.content.Context context,
android.util.AttributeSet attrs)
Creates map view
|
GLMapView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
Creates map view
|
GLMapView(android.content.Context context,
android.view.TextureView textureView)
Creates map view
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(GLMapDrawObject drawObject)
Adds the GLMapDrawObject to map.
|
GLMapAnimation |
animate(GLMapView.AnimateCallback callback)
Create and starts animation using provided callback
|
static double |
bearingAngle(MapGeoPoint from,
MapGeoPoint to)
Calculates bearing between two geo points
|
void |
captureFrameWhenFinish(GLMapView.ScreenCaptureCallback callback)
Captures frame when surface will be created and loading of resources finished.
|
void |
captureFrameWhenFinish(GLMapView.ScreenCaptureRawCallback callback)
Captures frame when surface will be created and loading of resources finished.
|
MapPoint |
convertDisplayDeltaToInternal(MapPoint val)
Converts a distance between two points on the screen to delta in internal format of GLMapView.
|
MapPoint |
convertDisplayDeltaToInternal(MapPoint val,
double mapZoom,
double mapAngle)
Converts a distance between two points on the screen to delta in internal format of GLMapView.
|
MapPoint |
convertDisplayToInternal(MapPoint val)
Converts a point on the surface to an internal map coordinate.
|
MapPoint |
convertInternalToDisplay(MapPoint val)
Converts a point in internal format of GLMapView to point on the surface of view.
|
double |
convertMetersToInternal(double meters)
Converts meters distance to internal distance
|
static void |
crashNDK() |
static void |
crashNDK2() |
GLMapTrack |
displayTrackData(GLMapTrackData trackData,
int drawOrder)
Creates a GLMapTrack that display given GLMapTrackData.
|
static double |
distanceInMeters(MapGeoPoint from,
MapGeoPoint to)
Calculates distance between two geo points
|
void |
doWhenSurfaceCreated(java.lang.Runnable r)
Runs command on internal rendering thread.
|
GLMapBBox |
getBBox()
BBox of current visible part of GLMapView
|
int |
getCenterTileState()
Return state of center tile
|
MapPoint |
getCurrentMapCenter(MapPoint point)
Gets current coordinates of the origin point of the map.
|
double |
getCurrentMapScale()
Gets current scale of the map.
|
double |
getCurrentMapZoom()
Gets current zoom level of the map.
|
float |
getFontScale() |
GLMapLocaleSettings |
getLocaleSettings() |
double |
getMapAngle()
Gets current angle of the map.
|
MapPoint |
getMapCenter()
Gets coordinates of the origin point of the map.
|
MapPoint |
getMapCenter(MapPoint point)
Gets coordinates of the origin point of the map.
|
MapPoint |
getMapOrigin() |
MapPoint |
getMapOrigin(MapPoint point)
Origin point of the map coordinate system.
|
double |
getMapScale()
Gets scale of the map.
|
double |
getMapZoom()
Get zoom level of the map.
|
GLMapRasterTileSource[] |
getRasterTileSources() |
java.lang.String[] |
getStyleOptions()
Returns options available in loaded style.
|
boolean |
isSurfaceCreated()
This function can be used to check if drawing surface is created and it is safe to call functions that depends on it.
|
boolean |
isUserInteractionEnabled() |
boolean |
loadStyle(android.content.res.AssetManager assetManager,
java.lang.String path)
Loads map style.
|
boolean |
loadStyle(GLMapView.ResourceLoadCallback callback)
Loads map style.
|
GLMapVectorObject |
mapObjectNearPoint(MapPoint point,
double maxDistance,
GLSearchCategories categories)
Returns object near point on map
|
double |
mapZoomForBBox(GLMapBBox bbox,
int mapWidth,
int mapHeight)
Calculates zoom of map to fit given bbox
|
void |
onSurfaceTextureAvailable(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height) |
boolean |
onSurfaceTextureDestroyed(android.graphics.SurfaceTexture surfaceTexture) |
void |
onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height) |
void |
onSurfaceTextureUpdated(android.graphics.SurfaceTexture surfaceTexture) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
void |
reloadTiles()
Force reloading of all tiles;
|
void |
remove(GLMapDrawObject drawObject)
Removes `GLMapDrawObject` from map.
|
void |
removeAllObjects()
Remove all images, image groups, tracks and marker layers from map
|
void |
setAttributionPosition(int placement)
Sets position of attribution.
|
void |
setCenterTileStateChangedCallback(java.lang.Runnable callback)
Set callback that will be called when center tile state is changed
|
void |
setFontScale(float scale)
Sets scale of font.
|
void |
setLocaleSettings(GLMapLocaleSettings localeSettings)
Sets map locale settings
|
void |
setMapAngle(double newAngle)
Sets zoom level of the map.
|
void |
setMapCenter(MapPoint center)
Sets coordinates of the origin point of the map.
|
void |
setMapDidMoveCallback(java.lang.Runnable callback)
Sets callback that will be called after move animation finished
|
void |
setMapOrigin(MapPoint point)
Origin point of the map coordinate system (X, Y).
|
void |
setMapScale(double newScale)
Set scale of the map.
|
void |
setMapZoom(double newZoom)
Sets zoom level of the map.
|
void |
setRasterTileSources(GLMapRasterTileSource[] tileSources)
By default rasterTileSources is null.
|
void |
setScaleRulerBottomText(java.lang.String text)
Sets text that will be displayed under scale ruler.
|
void |
setScaleRulerStyle(int units,
int placement,
MapPoint paddings,
double maxWidth)
Set style of scale ruler.
|
void |
setStyleOptions(java.lang.String[] options)
Sets enabled style options.
|
void |
setUserInteractionEnabled(boolean userInteractionEnabled)
If map do not need to handle touches set userInteractionEnabled to false.
|
void |
startAnimation(GLMapAnimation animation)
Starts animation.
|
void |
surfaceChanged(android.view.SurfaceHolder holder,
int format,
int width,
int height) |
void |
surfaceCreated(android.view.SurfaceHolder holder) |
void |
surfaceDestroyed(android.view.SurfaceHolder holder) |
draw, gatherTransparentRegion, getHolder, setSecure, setVisibility, setZOrderMediaOverlay, setZOrderOnTopaddChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableHotspotChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityClassName, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, keyboardNavigationClusterSearch, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onResolvePointerIcon, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreDefaultFocus, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAutofillHints, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDrawpublic float screenScale
public ImageManager imageManager
public GLMapView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
context - contextdefStyle - defStyleattrs - attributespublic GLMapView(android.content.Context context,
android.util.AttributeSet attrs)
context - contextattrs - attributespublic GLMapView(android.content.Context context)
context - contextpublic GLMapView(android.content.Context context,
android.view.TextureView textureView)
context - contexttextureView - textureViewpublic void surfaceChanged(android.view.SurfaceHolder holder,
int format,
int width,
int height)
surfaceChanged in interface android.view.SurfaceHolder.Callbackpublic void surfaceCreated(android.view.SurfaceHolder holder)
surfaceCreated in interface android.view.SurfaceHolder.Callbackpublic void surfaceDestroyed(android.view.SurfaceHolder holder)
surfaceDestroyed in interface android.view.SurfaceHolder.Callbackpublic void onSurfaceTextureAvailable(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height)
onSurfaceTextureAvailable in interface android.view.TextureView.SurfaceTextureListenerpublic void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height)
onSurfaceTextureSizeChanged in interface android.view.TextureView.SurfaceTextureListenerpublic boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture surfaceTexture)
onSurfaceTextureDestroyed in interface android.view.TextureView.SurfaceTextureListenerpublic void onSurfaceTextureUpdated(android.graphics.SurfaceTexture surfaceTexture)
onSurfaceTextureUpdated in interface android.view.TextureView.SurfaceTextureListenerpublic boolean isSurfaceCreated()
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent in class android.view.Viewpublic void setCenterTileStateChangedCallback(java.lang.Runnable callback)
callback - Runnable that will be post to main thread when center tile state is changedpublic int getCenterTileState()
public MapPoint convertDisplayDeltaToInternal(MapPoint val)
val - The point with the deltaconvertDisplayToInternal(MapPoint)public MapPoint convertDisplayDeltaToInternal(MapPoint val, double mapZoom, double mapAngle)
val - The point with the deltamapZoom - Zoom to use for calculationsmapAngle - Angle to use for calculationsconvertDisplayToInternal(MapPoint)public MapPoint convertDisplayToInternal(MapPoint val)
MapPoint pt = mapView.convertDisplayToInternal(new MapPoint(touchX, touchY));
val - The point on surface to be convertedconvertInternalToDisplay(MapPoint)public MapPoint convertInternalToDisplay(MapPoint val)
val - The point to be convertedconvertDisplayToInternal(MapPoint)public double convertMetersToInternal(double meters)
meters - The value to be convertedpublic void doWhenSurfaceCreated(java.lang.Runnable r)
final GLMapView mapView = (GLMapView) this.findViewById(R.id.map_view);
mapView.doWhenSurfaceCreated(new Runnable() {
public void run() {
mapView.setMapCenter(center, false);
mapView.scaleMap(scaleChange, null, false);
}
});
r - The Runnable to be executed at internal theread when surface will be createdpublic boolean loadStyle(android.content.res.AssetManager assetManager,
java.lang.String path)
mapView.loadStyle(getAssets(), "DefaultStyle.bundle"); assetManager - The AssetManager to be used while loading resourcespath - Path to folder in assets that contains Style.mapcss and imagespublic boolean loadStyle(GLMapView.ResourceLoadCallback callback)
callback - The ResourceLoadCallback to be used while loading resourcespublic java.lang.String[] getStyleOptions()
public void setStyleOptions(java.lang.String[] options)
options - options to enable in style.public void setLocaleSettings(GLMapLocaleSettings localeSettings)
localeSettings - New locale settings to use for translating map labelspublic GLMapLocaleSettings getLocaleSettings()
public boolean isUserInteractionEnabled()
public void setUserInteractionEnabled(boolean userInteractionEnabled)
userInteractionEnabled - false will disable handling user touches to move mappublic void setRasterTileSources(GLMapRasterTileSource[] tileSources)
tileSources - Raster tile sources to usepublic GLMapRasterTileSource[] getRasterTileSources()
public GLMapVectorObject mapObjectNearPoint(MapPoint point, double maxDistance, GLSearchCategories categories)
point - Point on mapmaxDistance - Distance in pointscategories - Possible categoriespublic void captureFrameWhenFinish(GLMapView.ScreenCaptureRawCallback callback)
ScreenCaptureRawCallback provides access to raw data of image (pixels and size of image)callback - ScreenCaptureRawCallback to call with resultspublic void captureFrameWhenFinish(GLMapView.ScreenCaptureCallback callback)
ScreenCaptureCallback provides Bitmap as a resultcallback - ScreenCaptureCallback to call with resultpublic double mapZoomForBBox(GLMapBBox bbox, int mapWidth, int mapHeight)
bbox - bbox that you wish to fitmapWidth - width of visible areamapHeight - height of visible areapublic MapPoint getMapCenter(MapPoint point)
MapPoint pt = mapView.getMapCenter(new MapPoint());point - The point to be filled with values.setMapCenter(MapPoint)public MapPoint getCurrentMapCenter(MapPoint point)
point - The point to be filled with values.public MapPoint getMapCenter()
MapPoint pt = mapView.getMapCenter();setMapCenter(MapPoint)public void setMapCenter(MapPoint center)
mapView.setMapCenter(center, true);center - New map center.getMapCenter(MapPoint)public MapPoint getMapOrigin(MapPoint point)
point - The point to be filled with values.public MapPoint getMapOrigin()
public void setMapOrigin(MapPoint point)
point - The point to be filled with values.public GLMapBBox getBBox()
public void setFontScale(float scale)
scale - New font scale (default is 1).public float getFontScale()
public double getMapAngle()
public void setMapAngle(double newAngle)
mapView.setMapZoom(16, false);newAngle - new zoom level for map.getMapAngle()public double getMapZoom()
double zoom = mapView.getMapZoom();setMapZoom(double)public double getCurrentMapZoom()
double zoom = mapView.getCurrentMapZoom();setMapZoom(double)public double getCurrentMapScale()
public double getMapScale()
getMapZoom()public void setMapZoom(double newZoom)
mapView.setMapZoom(16, false);newZoom - new zoom level for map.getMapZoom()public void setMapScale(double newScale)
newScale - new scale for map.getMapZoom()public void setScaleRulerStyle(int units,
int placement,
MapPoint paddings,
double maxWidth)
mapView.setScaleRulerStyle(GLUnitSystem.International, GLMapPlacement.BottomCenter, new MapPoint(10, 10), 200);
units - format of values to displayplacement - alignment of textpaddings - paddings of scale ruler in pointsmaxWidth - width of scale hit in pointspublic void setScaleRulerBottomText(java.lang.String text)
text - text to displaypublic void setAttributionPosition(int placement)
mapView.setAttributionPosition(GLMapAttibutionPosition.TopCenter);placement - placement of attributionpublic void removeAllObjects()
remove(GLMapDrawObject)public void add(GLMapDrawObject drawObject)
drawObject - object to addremove(GLMapDrawObject)public void remove(GLMapDrawObject drawObject)
drawObject - object to removeadd(GLMapDrawObject)public void startAnimation(GLMapAnimation animation)
animation - animation to startpublic GLMapAnimation animate(GLMapView.AnimateCallback callback)
callback - Callback that will configure animationpublic GLMapTrack displayTrackData(GLMapTrackData trackData, int drawOrder)
trackData - GLMapTrackData to displaydrawOrder - draw order of created objectadd(GLMapDrawObject)public void reloadTiles()
public void setMapDidMoveCallback(java.lang.Runnable callback)
callback - callback that will be post to ui thread after animation finishedpublic static double distanceInMeters(MapGeoPoint from, MapGeoPoint to)
from - first geo pointto - second geo pointpublic static double bearingAngle(MapGeoPoint from, MapGeoPoint to)
from - first geo pointto - second geo pointpublic static void crashNDK()
public static void crashNDK2()
Copyright © 2017 GetYourMap. All Rights Reserved.