EditLayerOverlay

public class EditLayerOverlay extends Overlay implements MapViewEventListener, GpsEventListener

The class for edit vector features

Fields

BUNDLE_KEY_HAS_EDITS

protected static final String BUNDLE_KEY_HAS_EDITS

BUNDLE_KEY_MODE

protected static final String BUNDLE_KEY_MODE

Store keys

BUNDLE_KEY_OVERLAY_POINT

protected static final String BUNDLE_KEY_OVERLAY_POINT

MODE_CHANGE

public static final int MODE_CHANGE

MODE_EDIT

public static final int MODE_EDIT

MODE_EDIT_BY_TOUCH

public static final int MODE_EDIT_BY_TOUCH

MODE_EDIT_BY_WALK

public static final int MODE_EDIT_BY_WALK

MODE_HIGHLIGHT

public static final int MODE_HIGHLIGHT

MODE_NONE

public static final int MODE_NONE

overlay mode constants

mBottomToolbar

protected BottomToolbar mBottomToolbar

mCanvasCenterX

protected float mCanvasCenterX

mDrawItems

protected List<DrawItem> mDrawItems

mFeature

protected Feature mFeature

mGpsEventSource

protected GpsEventSource mGpsEventSource

mHasEdits

protected boolean mHasEdits

mLayer

protected VectorLayer mLayer

mListeners

protected List<EditEventListener> mListeners

mMap

protected MapDrawable mMap

mMode

protected int mMode

mOverlayPoint

protected OverlayItem mOverlayPoint

mPaint

protected Paint mPaint

mReceiver

protected WalkEditReceiver mReceiver

mSelectedItem

protected DrawItem mSelectedItem

mTempPointOffset

protected PointF mTempPointOffset

mTolerancePX

protected final float mTolerancePX

mTopToolbar

protected Toolbar mTopToolbar

mType

protected static final int mType

edit feature style

Constructors

EditLayerOverlay

public EditLayerOverlay(Context context, MapViewOverlays mapViewOverlays)

Methods

addGeometryToMulti

protected boolean addGeometryToMulti(int geometryType)

addInnerRing

protected boolean addInnerRing()

addListener

public void addListener(EditEventListener listener)

clearAll

protected void clearAll()

clearDrawItems

protected void clearDrawItems()

clearGeometry

protected void clearGeometry()

createNewGeometry

public void createNewGeometry()

createPointFromOverlay

public void createPointFromOverlay()

deleteGeometry

protected boolean deleteGeometry()

deleteInnerRing

protected boolean deleteInnerRing()

deletePoint

protected boolean deletePoint()

draw

public void draw(Canvas canvas, MapDrawable mapDrawable)

drawCross

protected void drawCross(Canvas canvas)

drawItem

protected void drawItem(DrawItem drawItem, Canvas canvas, boolean isSelected)

drawOnPanning

public void drawOnPanning(Canvas canvas, PointF currentMouseOffset)

drawOnZooming

public void drawOnZooming(Canvas canvas, PointF currentFocusLocation, float scale)

fillDrawItems

public void fillDrawItems(GeoGeometry geom)

fillDrawLine

protected void fillDrawLine(GeoLineString lineString)

fillDrawPolygon

protected void fillDrawPolygon(GeoPolygon polygon)

fillDrawRing

protected void fillDrawRing(GeoLinearRing geoLinearRing)

fillGeometry

protected void fillGeometry()

getBaseGeometry

public static GeoGeometry getBaseGeometry(MapDrawable map, int geometryType, DrawItem drawItem)

getMarker

protected Bitmap getMarker()

getMode

public int getMode()

getNewGeometry

public static float[] getNewGeometry(int geometryType, float tolerance, MapDrawable map)

getSelectedFeature

public Feature getSelectedFeature()

getSelectedFeatureGeometry

public GeoGeometry getSelectedFeatureGeometry()

getSelectedFeatureId

public long getSelectedFeatureId()

hasEdits

public boolean hasEdits()

hideNavigationButton

protected void hideNavigationButton()

hideOverlayPoint

public void hideOverlayPoint()

mapToScreen

protected float[] mapToScreen(GeoPoint[] geoPoints)

movePointToLocation

protected boolean movePointToLocation()

moveSelectedPoint

protected boolean moveSelectedPoint(float x, float y)

newGeometryByWalk

public void newGeometryByWalk()

onBestLocationChanged

public void onBestLocationChanged(Location location)

onExtentChanged

public void onExtentChanged(float zoom, GeoPoint center)

onGpsStatusChanged

public void onGpsStatusChanged(int event)

onLayerAdded

public void onLayerAdded(int id)

onLayerChanged

public void onLayerChanged(int id)

onLayerDeleted

public void onLayerDeleted(int id)

onLayerDrawFinished

public void onLayerDrawFinished(int id, float percent)

onLayerDrawStarted

public void onLayerDrawStarted()

onLayersReordered

public void onLayersReordered()

onLocationChanged

public void onLocationChanged(Location location)

onLongPress

public void onLongPress(MotionEvent event)

onOptionsItemSelected

public boolean onOptionsItemSelected(int id)

onPause

public void onPause()

onRestoreState

public void onRestoreState(Bundle bundle)

onResume

public void onResume()

onSaveState

public Bundle onSaveState()

onSingleTapUp

public void onSingleTapUp(MotionEvent event)

Select point in current geometry or new geometry from current layer

Параметры:
  • event – Motion event

panMoveTo

public void panMoveTo(MotionEvent e)

panStart

public void panStart(MotionEvent event)

panStop

public void panStop()

removeListener

public void removeListener(EditEventListener listener)

selectGeometryInScreenCoordinates

public boolean selectGeometryInScreenCoordinates(float x, float y)

selectLastItem

protected void selectLastItem()

setBottomToolbar

public void setBottomToolbar(BottomToolbar toolbar)

setGeometryFromWalkEdit

public void setGeometryFromWalkEdit(GeoGeometry geometry)

setHasEdits

public void setHasEdits(boolean hasEdits)

setMode

public void setMode(int mode)

setOverlayPoint

public void setOverlayPoint(MotionEvent event)

setSelectedFeature

public void setSelectedFeature(long featureId)

setSelectedFeature

public void setSelectedFeature(Feature feature)

setSelectedLayer

public void setSelectedLayer(VectorLayer layer)

setTopToolbar

public void setTopToolbar(Toolbar toolbar)

showAllFeatures

public void showAllFeatures()

startGeometryByWalk

protected void startGeometryByWalk()

stopGeometryByWalk

public void stopGeometryByWalk()

update

protected void update()

updateMap

protected void updateMap()