The SDKs View - renders a map as soon as the SDK is initialized. More...
Inheritance diagram for IwMapView:Protected Member Functions | |
| void | createGlView (Context context, boolean doUseTextureView) |
| void | onAttachedToWindow () |
| void | onDetachedFromWindow () |
| void | onWindowVisibilityChanged (int visibility) |
This view is a FrameLayout that creates a Surface or Texture view as child(defined as xml attribute). It spawns a separate rendering thread that is bound to the views lifecycle
The SDKs Mapviewer object is created and maintained by this view. to modify the Mapview appearance you can either edit its xml definition, get the Mapviewer Object and modify it (getMapviewer()) or use the IwMapviewerConfig object
| IwMapView | ( | Context | context | ) |
| IwMapView | ( | Context | context, |
| AttributeSet | attrs | ||
| ) |
| IwMapView | ( | Context | context, |
| AttributeSet | attrs, | ||
| int | defStyle | ||
| ) |
| IwMapView | ( | Context | context, |
| boolean | doUseTextureView | ||
| ) |
Constructor if View created by hand
|
protected |
Init the GL View that will be added to this layout IwRenderThread and rendering will start when the GLSurface is crated -> after the view is added in the hierarchy
| boolean dispatchTouchEvent | ( | MotionEvent | ev | ) |
| int general | ( | GeneralCallbackType | callbackType, |
| String | optionalText, | ||
| double | optionalNumber | ||
| ) |
Is called for multiple purposes.
| callbackType | - See GeneralCallbackType |
| optionalText | - Content depends on the callbackType |
| optionalNumber | - Content depends on the callbackType |
Implements ApiListener.
| void getBitmap | ( | IGLBitmap | listener | ) |
get Bitmap of current gl view
| Object getGlSurface | ( | ) |
This Method returns the current rendering surface. It is only needed for the MySpin library support which requires the openGLSurface
| int getIwId | ( | ) |
| IwMapviewerConfig getMapviewerConfig | ( | ) |
| void handleMapTouch | ( | MotionEvent | motionEvent | ) |
Calculate movements on mapTouch
| void locationTrackingPausedByGesture | ( | ) |
| void locationTrackingResumedAfterTimeout | ( | ) |
| void mapCenterChange | ( | int | changeX, |
| int | changeY | ||
| ) |
| void mapContent | ( | Iterable< MapContent > | mapContentList | ) |
Retrieves a list of all possible map types
Implements ApiListener.
| void mapDataLoading | ( | boolean | isLoading | ) |
| void mapMotionStart | ( | ) |
| void mapMotionStop | ( | ) |
| void mapZoomed | ( | ) |
| void onApiInitError | ( | ApiError | err, |
| String | description | ||
| ) |
| void onApiInitialized | ( | ) |
callback when Api is initialized in GL view. Attention: Callback returns on the GL thread and not on the main ui thread
Implements ApiInitListener.
| void onApiUninitialized | ( | ) |
callback when api is uninitialized
When api uninit - The thread and Mapviewer need to be destroyed
Implements ApiInitListener.
|
protected |
When Layout is attached to a window, the GLView is added
|
protected |
When Layout is detached from a window, the GLView and mapviewer will be destroyed
| void onMapLongPress | ( | float | x, |
| float | y | ||
| ) |
listener for long press events on the map
| x | in screen coordinates |
| y | in screen coordinates |
Implements IwOnMapLongPressListener.
| void onMapSingleTap | ( | float | x, |
| float | y | ||
| ) |
listener for singleTap events on the map
| x | in screen coordinates |
| y | in screen coordinates |
Implements IwOnMapSingleTapListener.
| void onMapviewerDestroyed | ( | ) |
| void onMapviewerReady | ( | Mapviewer | map | ) |
apply listeners and configuration when mapviewer is ready
| map | - mapviewer that is ready |
| void onMeasure | ( | int | widthMeasureSpec, |
| int | heightMeasureSpec | ||
| ) |
pass view height to gesture controler so that Quickzoom can be calculated accurately
| void onRestoreInstanceState | ( | Parcelable | state | ) |
| Parcelable onSaveInstanceState | ( | ) |
| void onWindowFocusChanged | ( | boolean | hasWindowFocus | ) |
This is called if the views window is accessible or not. It pauses the map rendering if the screen is shut off ( which will not trigger onWindowVisibilityChanged )
| hasWindowFocus | - true if has focus |
|
protected |
Used to stop or resume rendering if window gets visible / invisible like switching to another activity
| visibility | - new visibility state |
| void pauseRendering | ( | ) |
pause the rendering and the gl thread
| void resumeRendering | ( | ) |
resume the rendering and the gl threadfffs if GLThread is not paused, it will render another frame
| void setDoubleTapToZoomEnabled | ( | boolean | enabled | ) |
This method can be used to enable or disable double tap to zoom a predefined distance
| enabled | - true to allow double tap zoom( default ) |
| void setManualRenderingControl | ( | boolean | manualControl | ) |
set manual rendering control, start and stop rendering only by @method pauseRendering and @method resumeRendering
| manualControl | - true if control rendering manually |
| void setMapRenderListener | ( | IwGLMapRendererListener | listener | ) |
| listener | - listener for renderer runs that informs about every render iteration |
| void setMapviewerConfig | ( | IwMapviewerConfig | config | ) |
| config | to set for this Mapviewer ( overwrite existing one ) and apply it |
| void setOnLocationTrackingPauseStateListener | ( | IwOnLocationTrackingPauseStateListener | listener | ) |
| void setOnMapCenterChangedListener | ( | IwOnMapCenterChangedListener | listener | ) |
| void setOnMapDataLoadingListener | ( | IwOnMapDataLoadingListener | listener | ) |
| void setOnMapLongPressListener | ( | IwOnMapLongPressListener | listener | ) |
| void setOnMapMotionStartListener | ( | IwOnMapMotionStartListener | listener | ) |
| void setOnMapMotionStopListener | ( | IwOnMapMotionStopListener | listener | ) |
| void setOnMapSingleTapListener | ( | IwOnMapSingleTapListener | listener | ) |
| void setOnMapviewerReadyListener | ( | IwOnMapviewerReadyListener | listener | ) |
| listener | - listener for maptouch and mapviewer lifecycle events |
| void setOnMapZoomedListener | ( | IwOnMapZoomedListener | listener | ) |
| void setOnNoQbliqueDataListener | ( | IwOnNoObliqueDataListener | listener | ) |
| void setQuickScaleEnabled | ( | boolean | enabled | ) |
This method can be used to enable or disable Quick scale - double tap the map and keep finger on it to scale via movement
| enabled | - true to allow quickscale ( default ) |
| void setTouchEnabled | ( | boolean | enabled | ) |
This method can be used to enable or disable touch gestures on the mapview
| enabled | - true to allow touch ( default ) |
| void setViewContainer | ( | boolean | doUseTextureView | ) |
Switch the view type at runtime Attention - This destroys the mapviewer until the next time onMapviewerReady is called
| ApiError showSelection | ( | final Selection | selection, |
| final Mapviewer | mapviewer, | ||
| final boolean | doShow, | ||
| final String | fillColor, | ||
| final String | borderColor, | ||
| final String | iconFileName | ||
| ) |
Show (or hide) the selection in the map. A selection is visible as long as the object is kept alive or this method is called to hide it explicitly.
| selection | - selection to show or hide |
| doShow | - Show (=true) or hide (=false). |
| mapviewer | - map to show selection on |
| fillColor | - Fill color for highlighted polylines and polygons. |
| borderColor | - Border color for highlighted polylines and polygons. |
| iconFileName | - Png icon filename for highlighted points. |
ApiError#OK if successful