com.supermap.mapping

Class MapControl

  • java.lang.Object
    • android.view.View
      • com.supermap.mapping.MapControl
  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback


    public class MapControl
    extends android.view.View
    The MapControl class.

    This class is used to provide an interface for displaying the map, and you can provide ways for the data and the map's Interoperability.

    A MapControl is a control that is used to display a map, so that you can edit the map visually. This way, you actually edit the data that the layers in the map references. When a MapControl has a map object, it can display this map object, and the display properties and some simple display and browse operations can be set in the map object. While the settings of visually editing and complex display and browse operations can be done in the MapControl object. .

    Note: If Workspace and MapControl have been associated while programming, when closing the objects, you should follow the following orders. .

    1. Close the Map object;
    2. Close the MapControl object;
    3. Close the Workspace object.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class android.view.View

        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.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.OnTouchListener
    • Field Summary

      • Fields inherited from class android.view.View

        ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, 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, 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, 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, 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, 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, VISIBLE, X, Y
    • Constructor Summary

      Constructors 
      Constructor and Description
      MapControl(android.content.Context context)
      Constructs a new MapControl object.
      MapControl(android.content.Context context, android.util.AttributeSet attrs)
      Initialize a new MapControl object with the parameters specified.
      MapControl(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
      Initialize a new MapControl object with the parameters specified.
      MapControl(android.content.Context context, android.util.AttributeSet attrs, int defStyle, Workspace workspace)
      Initialize a new MapControl object with the parameters specified.
      MapControl(android.content.Context context, android.util.AttributeSet attrs, Workspace workspace)
      Initialize a new MapControl object with the parameters specified.
      MapControl(android.content.Context context, Workspace workspace)
      Initializes a new instance of the MapControl class, and associates the Map object of this MapControl with the specified workspace.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addActionChangedListener(ActionChangedListener actionChangedListener)
      A listener that sets the remove action changed.
      void addGeometryAddedListener(GeometryAddedListener listener)
      Adds geometry added listener.
      void addGeometryDeletedListener(GeometryDeletedListener listener)
      Adds geometry deleted listener.
      void addGeometryDeletingListener(GeometryDeletingListener listener)
      Adds geometry deleting listener.
      void addGeometryIsSelectedListener(GeometryIsSelectedListener listener)
      Adds whether to select the listener.
      void addGeometryModifiedListener(GeometryModifiedListener listener)
      Adds geometry modified listener.
      void addGeometryModifyingListener(GeometryModifyingListener listener)
      Adds geometry modifying listener.
      void addGeometrySelectedListener(GeometrySelectedListener listener)
      Add geometry selected listener.
      void addMeasureListener(MeasureListener measureListener)
      Sets the measure listener.
      void addMeasureStateListener(MeasureStateListener listener)
      Set the metric listener
      long addPlotLibrary(java.lang.String libraryPath)
      Adds plot library.
      void addPlotObject(long libID, long symbolCode, Point2Ds pts)
      Constructs a military standard symbol object according to the given symbol and submit it to a dataset
      void addTouchPoint(Point pntTouch)
      Add an analog gesture point
      void addUndoStateChangeListener(UndoStateChangeListener listener)
      Sets the Undo listener.
      boolean appointEditGeometry(int GeoID, Layer layer)
      Appoints geometry to edit.
      boolean cancel()
      The cancel operation.
      boolean cancelAnimation()
      Cancels the animation of panning and zooming.
      boolean deleteCurrentGeometry()
      Deletes geometries which are drawn currently.
      void deleteGestureDetector()
      Deletes the gesture detector.
      void dispose()
      Disposes the display control.
      void enableRotateTouch(boolean value)
      Set whether the map gesture rotation is available
      void enableSlantTouch(boolean value)
      Set whether the map gesture pitch is available
      Action getAction()
      Returns the current operation state of the map in this MapControl.
      Collector getCollector()
      Data collection
      Geometry getCurrentGeometry()
      Gets the current drawing object.
      Layer getEditLayer()
      Gets the current editable layer.
      android.view.GestureDetector getGestureDetector()
      Gets the gesture detector that users customize
      Color getMagnifierCrossColor()
      Return magnifying glass cross hair color
      int getMagnifierRadius()
      Get the radius of the magnifying glass
      Map getMap()
      Returns the map object that will be displayed in this MapControl.
      int getMapHeight()
      The Map height.
      int getMapWidth()
      Gets the Map width.
      Navigation getNavigation()
      Gets the navigation module.
      int getNodeColor()
      Gets the node color.
      double getNodeSize()
      Gets the node size.
      int getObjectColor()
      Gets the color of the object edit.
      double getObjectWidth()
      Gets the width of the object edit.
      SelectionMode getSelectionMode()
      Returns the selection mode when selecting the feature.
      double getSelectionTolerance()
      Returns the selection tolerance.
      SnapSetting getSnapSetting()
      Gets the capture settings for the map control
      int getStrokeColor()
      Gets the stroke color of an object.
      int getStrokeFillColor()
      Gets the stroke fill color of an object.
      double getStrokeWidth()
      Gets the stroke width of an object.
      Action getUserAction()
      Gets the user action.
      boolean isMagnifierEnabled()
      Whether magnifier is enabled.
      boolean isSnapCreatPointEnable()
      Gets whether a point is added only when snapping a node
      boolean onMultiTouch(android.view.MotionEvent event)
      Returns a bool that specifies whether the current gesture is recieved by View control.
      boolean onSelect(int x, int y)
      The geometry select event.
      boolean outputMap(android.graphics.Bitmap drawing)
      Draws current contents to a specified bitmap.
      boolean outputMap(android.graphics.Bitmap drawing, int nSrc_x, int nSrc_y)
      Draws current contents to a specified bitmap.
      boolean panTo(Point2D desPoint, int duration)
      Within specified time, pan the map to a specified place.
      boolean redo()
      Redoes the last map operation that was undone by the undo method as well as if the CanRedo property is true.
      boolean removeActionChangedListener(ActionChangedListener listener)
      A listener that the remove action changed.
      boolean removeConfigurationChangedListener(ConfigurationChangedListener listener)
      Removes the listener on the screen rotation event.
      boolean removeEditStatusListener(EditStatusListener listener)
      Removes the edit status listener.
      void removeGeometryAddedListener(GeometryAddedListener listener)
      Removes geometry added listener.
      void removeGeometryDeletedListener(GeometryDeletedListener listener)
      Removes geometry deleted listener.
      void removeGeometryDeletingListener(GeometryDeletingListener listener)
      Removes geometry deleting listener.
      void removeGeometryIsSelectedListener(GeometryIsSelectedListener listener)
      Deletes whether to select the listener.
      void removeGeometryModifiedListener(GeometryModifiedListener l)
      Removes geometry modified listener.
      void removeGeometryModifyingListener(GeometryModifyingListener listener)
      Removes geometry modifying listener.
      void removeGeometrySelectedListener(GeometrySelectedListener listener)
      Removes geometry selected listener.
      boolean removeMapInertiaListener(MapInertiaListener listener)
      Removes the map inertia listener.
      boolean removeMapParamChangedListener(MapParameterChangedListener listener)
      Removes the map parameter changed listener.
      boolean removeMeasureListener(MeasureListener measureListener)
      Removes the measure listener.
      boolean removeMeasureStateListener(MeasureStateListener listener)
      Remove the metric listener
      void removePlotLibrary(long libraryID)
      Removes the plot library according to the library ID.
      boolean removeUndoStateChangeListener(UndoStateChangeListener listener)
      Removes the Undo listener.
      void setAction(Action action)
      Sets the current operation state of the map in this MapControl.
      void setConfigurationChangedListener(ConfigurationChangedListener listener)
      Sets the listener on the screen rotation event.
      void setEditStatusListener(EditStatusListener listener)
      Sets the edit status listener.
      void setGestureDetector(android.view.GestureDetector gsDetector)
      Sets the gesture detector.
      void setMagnifierCrossColor(Color color)
      Set the magnifying glass cross hair color
      void setMagnifierEnabled(boolean enabled)
      Sets whether to use magnifier which magnifies the area that you tap.
      void setMagnifierRadius(int radius)
      Set the magnifying glass radius
      void setMapInertiaListener(MapInertiaListener listener)
      Sets the map inertia listener.
      void setMapOverlay(boolean bIsMapOverlay)
      Sets whether the map is overlaid layer
      void setMapParamChangedListener(MapParameterChangedListener listener)
      Sets the map parameter changed listener.
      void setNodeColor(int color)
      Sets the node color.
      void setNodeSize(double size)
      Sets the node size.
      void setNodeStyle(GeoStyle style)
      Sets the node styles.
      void setObjectColor(int color)
      Sets the color of the object edit.
      void setObjectWidth(double width)
      Sets the width of the object edit.
      void setPaintProfileListener(PaintProfileListener listener)
      Set to draw time-consuming listener, the map rendering once completed when the callback, the unit is ms.
      void setPlotSymbol(long libraryID, long symbolCode)
      Sets the plot symbol.
      boolean setRefreshListener(RefreshListener listener)
      Sets the refresh listener.
      void setSelectionMode(SelectionMode selectionMode)
      Sets the selection mode when selecting the feature.
      void setSelectionTolerance(double value)
      Sets the selection tolerance.
      void setSnapCreatPointEnable(boolean value)
      When the Snap is in open status, true means adding a point only when a point is snapped.
      void setSnapSetting(SnapSetting value)
      Set the snap control settings for the map control
      void setStaticGeometrySelectedListener(GeometrySelectedListener listener)
      Set the static object to select the monitor, synchronize the response object selection operation
      void setStrokeColor(int color)
      Sets the stroke color of an object.
      void setStrokeFillColor(int color)
      Sets the stroke fill color of an object.
      void setStrokeWidth(double width)
      Sets the stroke width.
      boolean submit()
      The submit operation.
      boolean undo()
      Undoes the last operation if the CanUndo property is true.
      boolean zoomTo(double scale, int duration)
      Within specified time, zoom the map into a specified scale.
      • Methods inherited from class android.view.View

        addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, 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, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, 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, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, 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, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, 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, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MapControl

        public MapControl(android.content.Context context)
        Constructs a new MapControl object.
        Parameters:
        context - The Context the view is running in, through which it can access the current theme, resources, etc.
      • MapControl

        public MapControl(android.content.Context context,
                          Workspace workspace)
        Initializes a new instance of the MapControl class, and associates the Map object of this MapControl with the specified workspace.
        Parameters:
        context - The Context the view is running in, through which it can access the current theme, resources, etc.
        workspace - Specified workspace.
      • MapControl

        public MapControl(android.content.Context context,
                          android.util.AttributeSet attrs)
        Initialize a new MapControl object with the parameters specified.
        Parameters:
        context - The Context the view is running in, through which it can access the current theme, resources, etc.
        attrs - The attributes of the XML tag that is inflating the view.
      • MapControl

        public MapControl(android.content.Context context,
                          android.util.AttributeSet attrs,
                          Workspace workspace)
        Initialize a new MapControl object with the parameters specified.
        Parameters:
        context - The Context the view is running in, through which it can access the current theme, resources, etc.
        attrs - The attributes of the XML tag that is inflating the view.
        workspace - Specified workspace.
      • MapControl

        public MapControl(android.content.Context context,
                          android.util.AttributeSet attrs,
                          int defStyle)
        Initialize a new MapControl object with the parameters specified.
        Parameters:
        context - The Context the view is running in, through which it can access the current theme, resources, etc.
        attrs - The attributes of the XML tag that is inflating the view.
        defStyle - The default style to apply to this view.If 0, no style will be applied (beyond what is included in the theme).This may either be an attribute resource, whose value will be retrieved from the current theme, or an explicit style resource.
      • MapControl

        public MapControl(android.content.Context context,
                          android.util.AttributeSet attrs,
                          int defStyle,
                          Workspace workspace)
        Initialize a new MapControl object with the parameters specified.
        Parameters:
        context - The Context the view is running in, through which it can access the current theme, resources, etc.
        attrs - The attributes of the XML tag that is inflating the view.
        defStyle - The default style to apply to this view. If 0, no style will be applied (beyond what is included in the theme). This may either be an attribute resource, whose value will be retrieved from the current theme, or an explicit style resource.
        workspace - Specified workspace.
    • Method Detail

      • getGestureDetector

        public android.view.GestureDetector getGestureDetector()
        Gets the gesture detector that users customize
        Returns:
        The action gesture.
      • outputMap

        public boolean outputMap(android.graphics.Bitmap drawing)
        Draws current contents to a specified bitmap.
        Parameters:
        drawing - Need to be drawn bitmap.
        Returns:
        Returns true if the drawing is finished; false otherwise.
      • getNavigation

        public Navigation getNavigation()
        Gets the navigation module.
        Returns:
        Navigation example.
      • setMapInertiaListener

        public void setMapInertiaListener(MapInertiaListener listener)
        Sets the map inertia listener.
        Parameters:
        listener - A listener for setting the map inertia event.
      • removeMapInertiaListener

        public boolean removeMapInertiaListener(MapInertiaListener listener)
        Removes the map inertia listener.
        Parameters:
        listener - A listener for receiving map inertia events.
        Returns:
        boolean, true if the listener is removed successfully; false otherwise;
      • setEditStatusListener

        public void setEditStatusListener(EditStatusListener listener)
        Sets the edit status listener.
        Parameters:
        listener - A listener for setting the editing action event.
      • removeEditStatusListener

        public boolean removeEditStatusListener(EditStatusListener listener)
        Removes the edit status listener.
        Parameters:
        listener - A listener for editing state events.
        Returns:
        Removes the edit status listener successfully, returns true, otherwise returns false.
      • addActionChangedListener

        public void addActionChangedListener(ActionChangedListener actionChangedListener)
        A listener that sets the remove action changed.
        Parameters:
        actionChangedListener - A listener for receiving action change events.
      • removeActionChangedListener

        public boolean removeActionChangedListener(ActionChangedListener listener)
        A listener that the remove action changed.
        Parameters:
        listener - A listener for receiving action change events.
        Returns:
        Removes the action change listener successfully, returns true, otherwise returns false.
      • addMeasureListener

        public void addMeasureListener(MeasureListener measureListener)
        Sets the measure listener.
        Parameters:
        measureListener - Scale monitor.
      • removeMeasureListener

        public boolean removeMeasureListener(MeasureListener measureListener)
        Removes the measure listener.
        Parameters:
        measureListener - Scale monitor.
        Returns:
        Removes the metric listener successfully returns true, false otherwise.
      • addUndoStateChangeListener

        public void addUndoStateChangeListener(UndoStateChangeListener listener)
        Sets the Undo listener.
        Parameters:
        listener - Undo listener.
      • removeUndoStateChangeListener

        public boolean removeUndoStateChangeListener(UndoStateChangeListener listener)
        Removes the Undo listener.
        Parameters:
        listener - Undo listener.
        Returns:
        Remove Undo listener successfully, return true, otherwise false.
      • setMapParamChangedListener

        public void setMapParamChangedListener(MapParameterChangedListener listener)
        Sets the map parameter changed listener.
        Parameters:
        listener - Map parameter change listener.
      • removeMapParamChangedListener

        public boolean removeMapParamChangedListener(MapParameterChangedListener listener)
        Removes the map parameter changed listener.
        Parameters:
        listener - Map parameter change listener.
        Returns:
        Removes the map parameter change listener successfully, returns true, otherwise returns false.
      • setConfigurationChangedListener

        public void setConfigurationChangedListener(ConfigurationChangedListener listener)
        Sets the listener on the screen rotation event.
        Parameters:
        listener - Switch the listener.
      • onSelect

        public boolean onSelect(int x,
                                int y)
        The geometry select event.
        Parameters:
        x - Select the x coordinate of the point
        y - Select the y coordinate of the point
        Returns:
        Whether to choose success, select the object to return true, not selected to return false
      • appointEditGeometry

        public boolean appointEditGeometry(int GeoID,
                                           Layer layer)
        Appoints geometry to edit.
        Parameters:
        GeoID - The geometric object to edit.
        layer - The layer to which the geometric object belongs to.
        Returns:
        object is specified successfully, success returns true, otherwise false.
      • removeConfigurationChangedListener

        public boolean removeConfigurationChangedListener(ConfigurationChangedListener listener)
        Removes the listener on the screen rotation event.
        Parameters:
        listener - Switch the listener.
        Returns:
        remove the vertical and horizontal screen switch monitor successful, return true, otherwise return false.
      • setRefreshListener

        public boolean setRefreshListener(RefreshListener listener)
        Sets the refresh listener.
        Parameters:
        listener - refresh the listener.
        Returns:
        Returns true if the refresh succeeds, false otherwise.
      • setGestureDetector

        public void setGestureDetector(android.view.GestureDetector gsDetector)
        Sets the gesture detector.
        Parameters:
        gsDetector - user gesture recognizer.
      • deleteGestureDetector

        public void deleteGestureDetector()
        Deletes the gesture detector.
      • getAction

        public Action getAction()
        Returns the current operation state of the map in this MapControl. In the Action class, all the operation modes that are supported so far are defined.
        Returns:
        The current operating state of the map in the map control.
        Throws:
        java.lang.EnumConstantNotPresentException - when the fetched value is incorrect.
        Default:
        defaults to NULL.
      • getUserAction

        public Action getUserAction()
        Gets the user action.
        Returns:
        the current user action.
      • submit

        public boolean submit()
        The submit operation. For selection, this API is to write the new geometries into the dataset; for editing, to update the ongoing editing geometries in the dataset.
        Returns:
        commit is successful, success returns true, otherwise false.
      • cancel

        public boolean cancel()
        The cancel operation. For selection, the new unsubmitted data is canceled; for editing, go back to the last save status.
        Returns:
        Cancel whether successful, cancel successfully return true, otherwise return false.
      • setAction

        public void setAction(Action action)
        Sets the current operation state of the map in this MapControl. In the Action class, all the operation modes that are supported so far are defined.
        Parameters:
        action - The user's set of map operations
      • getSelectionTolerance

        public double getSelectionTolerance()
        Returns the selection tolerance. If the distance between the cursor and the nearest point on the feature from the cursor is within the selection tolerance when you click, the feature is regarded to be selected. This is used when selecting features using selecting by point. The unit is millimeter and accurate to 0.1mm. .
        Returns:
        Select the tolerance for the space object.
        Default:
        The default value is 1.
      • setSelectionTolerance

        public void setSelectionTolerance(double value)
        Sets the selection tolerance. If the distance between the cursor and the nearest point on the feature from the cursor is within the selection tolerance when you click, the feature is regarded to be selected. This is used when selecting features using selecting by point. The unit is millimeter and accurate to 0.1mm. .
        Parameters:
        value - Specifies the tolerance for selecting a spatial object.
      • getSelectionMode

        public SelectionMode getSelectionMode()
        Returns the selection mode when selecting the feature. Please refer to the SelectionMode constant. Applies to other region selection modes except the selection-by-point mode.
        Returns:
        object selection mode.
        Default:
        The default object selection mode isSelectionMode.CONTAIN_INNER_POINT,that is, the object's interior point is selected within the selection range.
      • setSelectionMode

        public void setSelectionMode(SelectionMode selectionMode)
        Sets the selection mode when selecting the feature. Please refer to the SelectionMode constant. Applies to other region selection modes except the selection-by-point mode.
        Parameters:
        selectionMode - Specifies the selection mode of the object.
      • getMap

        public Map getMap()
        Returns the map object that will be displayed in this MapControl.
        Returns:
        The map object is displayed in the map control.
        Default:
        The default value is an empty Map object.
      • getMapHeight

        public int getMapHeight()
        The Map height.
        Returns:
        control height.
      • getMapWidth

        public int getMapWidth()
        Gets the Map width.
        Returns:
        control width.
      • dispose

        public void dispose()
        Disposes the display control.
      • onMultiTouch

        public boolean onMultiTouch(android.view.MotionEvent event)
        Returns a bool that specifies whether the current gesture is recieved by View control.
        Parameters:
        event - manipulates gesture events.
        Returns:
        returns true for the current gesture; false otherwise.
      • undo

        public boolean undo()
        Undoes the last operation if the CanUndo property is true.
        Returns:
        Returns true if the undo operation completes successfully; false otherwise.
      • redo

        public boolean redo()
        Redoes the last map operation that was undone by the undo method as well as if the CanRedo property is true.
        Returns:
        Returns true if the restore operation completes successfully; false otherwise.
      • panTo

        public boolean panTo(Point2D desPoint,
                             int duration)
        Within specified time, pan the map to a specified place.
        Parameters:
        desPoint - target point.
        duration - animation duration.
        Returns:
        translation is successful, success returns true, otherwise false.
      • zoomTo

        public boolean zoomTo(double scale,
                              int duration)
        Within specified time, zoom the map into a specified scale.
        Parameters:
        scale - target scale.
        duration - animation duration
        Returns:
        map success is successful, return true, otherwise false.
      • cancelAnimation

        public boolean cancelAnimation()
        Cancels the animation of panning and zooming.
        Returns:
        whether to successfully cancel the translation and zoom of the animation, the successful cancellation of true, otherwise return false.
      • getEditLayer

        public Layer getEditLayer()
        Gets the current editable layer.
        Returns:
        The currently editing the layer.
      • deleteCurrentGeometry

        public boolean deleteCurrentGeometry()
        Deletes geometries which are drawn currently.
        Returns:
        Whether to successfully delete the currently drawn geometry object, the success returns true, otherwise false.
      • getCurrentGeometry

        public Geometry getCurrentGeometry()
        Gets the current drawing object.

        The obtained Geometry meeds the operation disose(). To release the object displayed on a map, please call deleteCurrentGeometry().

        Returns:
        The geometric object that is currently drawn, or null if no geometric object is currently drawn.
      • addGeometrySelectedListener

        public void addGeometrySelectedListener(GeometrySelectedListener listener)
        Add geometry selected listener.
        Parameters:
        listener - Object selected listener.
      • removeGeometrySelectedListener

        public void removeGeometrySelectedListener(GeometrySelectedListener listener)
        Removes geometry selected listener.
        Parameters:
        listener - Object selected listener.
      • addGeometryDeletingListener

        public void addGeometryDeletingListener(GeometryDeletingListener listener)
        Adds geometry deleting listener.
        Parameters:
        listener - The object is deleted before the completion of the listener.
      • removeGeometryDeletingListener

        public void removeGeometryDeletingListener(GeometryDeletingListener listener)
        Removes geometry deleting listener.
        Parameters:
        listener - The object is deleted before the completion of the listener.
      • addGeometryDeletedListener

        public void addGeometryDeletedListener(GeometryDeletedListener listener)
        Adds geometry deleted listener.
        Parameters:
        listener - The object is deleted to complete the listener.
      • removeGeometryDeletedListener

        public void removeGeometryDeletedListener(GeometryDeletedListener listener)
        Removes geometry deleted listener.
        Parameters:
        listener - The object is deleted to complete the listener.
      • addGeometryAddedListener

        public void addGeometryAddedListener(GeometryAddedListener listener)
        Adds geometry added listener.
        Parameters:
        listener - Object to add listener.
      • removeGeometryAddedListener

        public void removeGeometryAddedListener(GeometryAddedListener listener)
        Removes geometry added listener.
        Parameters:
        listener - Object to add listener.
      • addGeometryModifyingListener

        public void addGeometryModifyingListener(GeometryModifyingListener listener)
        Adds geometry modifying listener.
        Parameters:
        listener - Object modified before the listener.
      • setStrokeWidth

        public void setStrokeWidth(double width)
        Sets the stroke width.
        Parameters:
        width - The width of the brush, in millimeters, is accurate to 0.1.
      • getStrokeWidth

        public double getStrokeWidth()
        Gets the stroke width of an object.
        Returns:
        The width of the brush when drawing the object.
      • setStrokeColor

        public void setStrokeColor(int color)
        Sets the stroke color of an object.
        Parameters:
        color - The color of the brush when drawing the object.
      • getStrokeColor

        public int getStrokeColor()
        Gets the stroke color of an object.
        Returns:
        The color of the brush when drawing the object.
      • setStrokeFillColor

        public void setStrokeFillColor(int color)
        Sets the stroke fill color of an object.
        Parameters:
        color - The fill color of the brush when drawing the object.
      • getStrokeFillColor

        public int getStrokeFillColor()
        Gets the stroke fill color of an object.
        Returns:
        The fill color of the brush when drawing the object.
      • setNodeColor

        public void setNodeColor(int color)
        Sets the node color.
        Parameters:
        color - The color of the node.
      • getNodeColor

        public int getNodeColor()
        Gets the node color.
        Returns:
        The color of the node.
      • setNodeSize

        public void setNodeSize(double size)
        Sets the node size.
        Parameters:
        size - The size of the node.
      • getNodeSize

        public double getNodeSize()
        Gets the node size.
        Returns:
        The size of the node.
      • removeGeometryModifyingListener

        public void removeGeometryModifyingListener(GeometryModifyingListener listener)
        Removes geometry modifying listener.
        Parameters:
        listener - Object modified before the listener.
      • setMagnifierEnabled

        public void setMagnifierEnabled(boolean enabled)
        Sets whether to use magnifier which magnifies the area that you tap. If you set it as true, after the magnifier is enabled, you can move your finger on the map, and your magnifier will follow your finger.
        Parameters:
        enabled - Whether to enable the magnifying glass, true means that the magnifying glass is enabled, false means that the magnifying glass is not enabled.
      • isMagnifierEnabled

        public boolean isMagnifierEnabled()
        Whether magnifier is enabled.
        Returns:
        A Boolean value, true means that the magnifying glass is enabled, false means that the magnifying glass is not enabled.
      • addGeometryModifiedListener

        public void addGeometryModifiedListener(GeometryModifiedListener listener)
        Adds geometry modified listener.
        Parameters:
        listener - The object is modified to complete the listener.
      • removeGeometryModifiedListener

        public void removeGeometryModifiedListener(GeometryModifiedListener l)
        Removes geometry modified listener.
        Parameters:
        l - The object is modified to complete the listener.
      • setPlotSymbol

        public void setPlotSymbol(long libraryID,
                                  long symbolCode)
        Sets the plot symbol.

        Sets the symbols to be drawn based on the specified symbol library ID and the symbol's code.

        Parameters:
        libraryID - The symbol library ID, which is the return value of the addPlot Library ()
        symbolCode - symbol Code
      • addPlotLibrary

        public long addPlotLibrary(java.lang.String libraryPath)
        Adds plot library. If the library isn't added, the plot symbols cannot be rightly displayed on the map.
        Parameters:
        libraryPath - The absolute path of the symbol library in the device
        Returns:
        Returns the ID of the symbol library
      • removePlotLibrary

        public void removePlotLibrary(long libraryID)
        Removes the plot library according to the library ID.
        Parameters:
        libraryID - The symbol library ID, which is the return value of addPlotLibrary ()
      • setSnapSetting

        public void setSnapSetting(SnapSetting value)
        Set the snap control settings for the map control
        Parameters:
        value - capture settings
      • getSnapSetting

        public SnapSetting getSnapSetting()
        Gets the capture settings for the map control
        Returns:
        capture settings
      • addTouchPoint

        public void addTouchPoint(Point pntTouch)
        Add an analog gesture point
        Parameters:
        pntTouch - gesture point
      • addMeasureStateListener

        public void addMeasureStateListener(MeasureStateListener listener)
        Set the metric listener
        Parameters:
        listener - The state listener
      • removeMeasureStateListener

        public boolean removeMeasureStateListener(MeasureStateListener listener)
        Remove the metric listener
        Parameters:
        listener - The state listener
        Returns:
        whether the removal was successful
      • enableRotateTouch

        public void enableRotateTouch(boolean value)
        Set whether the map gesture rotation is available
        Parameters:
        value - it's usable or not
      • enableSlantTouch

        public void enableSlantTouch(boolean value)
        Set whether the map gesture pitch is available
        Parameters:
        value - it's usable or not
      • setMagnifierRadius

        public void setMagnifierRadius(int radius)
        Set the magnifying glass radius
        Parameters:
        radius - Magnifying mirror radius
      • getMagnifierRadius

        public int getMagnifierRadius()
        Get the radius of the magnifying glass
        Returns:
        Returns the magnifying glass radius
      • getMagnifierCrossColor

        public Color getMagnifierCrossColor()
        Return magnifying glass cross hair color
        Returns:
        Cross hair color
      • setMagnifierCrossColor

        public void setMagnifierCrossColor(Color color)
        Set the magnifying glass cross hair color
        Parameters:
        color - Magnifying glass cross hair color
      • setObjectColor

        public void setObjectColor(int color)
        Sets the color of the object edit. Object editing includes object translation, box selection and other topological editing functions (see the functionAction)
        Parameters:
        color - The color of the node
      • getObjectColor

        public int getObjectColor()
        Gets the color of the object edit. Object editing includes object translation, box selection and other topological editing functions (see the functionAction)
        Returns:
        The color of the node
      • setObjectWidth

        public void setObjectWidth(double width)
        Sets the width of the object edit. Object editing includes object translation, box selection and other topological editing functions (see the functionAction)
        Parameters:
        width - The size of the node
      • getObjectWidth

        public double getObjectWidth()
        Gets the width of the object edit. Object editing includes object translation, box selection and other topological editing functions (see the functionAction)
        Returns:
        The size of the node
      • setStaticGeometrySelectedListener

        public void setStaticGeometrySelectedListener(GeometrySelectedListener listener)
        Set the static object to select the monitor, synchronize the response object selection operation
        Parameters:
        listener - Object selected for listening
      • setPaintProfileListener

        public void setPaintProfileListener(PaintProfileListener listener)
        Set to draw time-consuming listener, the map rendering once completed when the callback, the unit is ms.
        Parameters:
        listener - Draw time-consuming listener.
      • setNodeStyle

        public void setNodeStyle(GeoStyle style)
        Sets the node styles.
        Parameters:
        style - the node style
      • addGeometryIsSelectedListener

        public void addGeometryIsSelectedListener(GeometryIsSelectedListener listener)
        Adds whether to select the listener. Click to trigger the listener.
        Parameters:
        listener - whether to select the listener. Click to trigger the listener.
      • removeGeometryIsSelectedListener

        public void removeGeometryIsSelectedListener(GeometryIsSelectedListener listener)
        Deletes whether to select the listener. Click to trigger the listener.
        Parameters:
        listener - whether to select the listener. Click to trigger the listener.
      • addPlotObject

        public void addPlotObject(long libID,
                                  long symbolCode,
                                  Point2Ds pts)
        Constructs a military standard symbol object according to the given symbol and submit it to a dataset
        Parameters:
        libID - plotting library ID
        symbolCode - symbol code
        pts - plotting symbol coordinate string. Point plotting symbol only has one coordinate
      • getCollector

        public Collector getCollector()
        Data collection
        Returns:
        Collected data
      • outputMap

        public boolean outputMap(android.graphics.Bitmap drawing,
                                 int nSrc_x,
                                 int nSrc_y)
        Draws current contents to a specified bitmap.
        Parameters:
        drawing - Need to be drawn bitmap.
        nSrc_x - the x coordinate of the captured start
        nSrc_y - the y coordinate of the captured start
        Returns:
        Draws current contents to a specified bitmap.
      • setMapOverlay

        public void setMapOverlay(boolean bIsMapOverlay)
        Sets whether the map is overlaid layer
        Parameters:
        bIsMapOverlay - Sets whether the map is overlaid layer
      • isSnapCreatPointEnable

        public boolean isSnapCreatPointEnable()
        Gets whether a point is added only when snapping a node
        Returns:
        whether a point is added only when snapping a node
      • setSnapCreatPointEnable

        public void setSnapCreatPointEnable(boolean value)
        When the Snap is in open status, true means adding a point only when a point is snapped. False means adopting the default status. When Snap is in close status, the interface is invalid.
        Parameters:
        value - Turn on snapping