|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View
com.esri.android.map.LayerView<LayerModel>
com.esri.android.map.LocationService.LocationServiceInner
protected class LocationService.LocationServiceInner
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.view.View |
|---|
android.view.View.BaseSavedState, android.view.View.MeasureSpec, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnFocusChangeListener, android.view.View.OnKeyListener, android.view.View.OnLongClickListener, android.view.View.OnTouchListener |
| Field Summary | |
|---|---|
protected static int |
START_MSG
|
protected static int |
STOP_MSG
|
| Fields inherited from class com.esri.android.map.LayerView |
|---|
canvasOffsetX, canvasOffsetY, mapView, model |
| Fields inherited from class android.view.View |
|---|
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET |
| Constructor Summary | |
|---|---|
LocationService.LocationServiceInner(MapView map)
|
|
| Method Summary | |
|---|---|
android.location.Location |
getLocation()
Returns the current location in the spatial reference WGS1984 (WKID=4326). |
android.location.LocationListener |
getLocationListener()
|
OnSingleTapListener |
getOnSingleTapListener()
Returns the current listener for the single tap event on the LocationService symbol. |
Point |
getPoint()
Returns the current coordinates in the map's spatial reference. |
Symbol |
getSymbol()
|
protected LayerModel |
initModel()
This method will instantiate the LayerModel object. |
boolean |
isAccuracyCircleOn()
|
boolean |
isAllowNetworkLocation()
|
boolean |
isAutoPan()
|
boolean |
isBearingOn()
|
protected boolean |
isBetterLocation(android.location.Location location,
android.location.Location currentBestLocation)
Determines whether one Location reading is better than the current Location fix |
boolean |
isStarted()
|
protected void |
onDetachedFromWindow()
|
protected void |
onDraw(android.graphics.Canvas canvas)
|
void |
setAccuracyCircleOn(boolean accuracyCircleOn)
|
void |
setAllowNetworkLocation(boolean allowNetworkLocation)
Allow/disallow the usage of the network (cellular network and WiFi if available) to determine the current location |
void |
setAutoPan(boolean autoPan)
activate/deactivate the autoPan |
void |
setBearing(boolean bearing)
activate/deactivate the bearing representation. |
void |
setLocationListener(android.location.LocationListener locationListener)
|
void |
setOnSingleTapListener(OnSingleTapListener onSingleTapListener)
Sets a listener overriding the default behavior of a single tap on the LocationService symbol. |
void |
setSymbol(Symbol symbol)
|
void |
start()
Starts the LocationService. |
void |
stop()
Stops the LocationService |
void |
uiStart()
|
void |
uiStop()
|
protected void |
update()
Updates the MapView with images that are retrieved from the LayerView's associated LayerModel object. |
protected boolean |
verifyDrawable(android.graphics.drawable.Drawable who)
|
| Methods inherited from class com.esri.android.map.LayerView |
|---|
cancelPendingTasks, clearCache, getCenter, getDefaultSpatialReference, getExtent, getFullExtent, getModel, getOffset, getOnStatusChangedListener, getResolution, getSpatialReference, getUrl, getUrlHashCode, initLayer, isInitialized, isLongLifeCache, onAnimationEnd, onAnimationStart, onSizeChanged, setLongLifeCache, setOffset, setOnStatusChangedListener, setUrl, toMapPoint, toMapPoint, toScreenPoint, toScreenPoint |
| Methods inherited from class android.view.View |
|---|
addFocusables, addFocusables, addTouchables, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, clearFocus, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDraw, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, drawableStateChanged, findFocus, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getKeyDispatcherState, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTag, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasFocus, hasFocusable, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPressed, isSaveEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDisplayHint, onDrawScrollBars, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowVisibilityChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPadding, setPressed, setSaveEnabled, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setSelected, setSoundEffectsEnabled, setTag, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int START_MSG
protected static final int STOP_MSG
| Constructor Detail |
|---|
public LocationService.LocationServiceInner(MapView map)
map - the MapView the location will be displayed on.| Method Detail |
|---|
public void start()
public void uiStart()
public void stop()
public void uiStop()
public android.location.Location getLocation()
Location.
public Point getPoint()
Point containing the coordinates.public boolean isAccuracyCircleOn()
public void setAccuracyCircleOn(boolean accuracyCircleOn)
accuracyCircleOn - the accuracyCircleOn to set
protected boolean isBetterLocation(android.location.Location location,
android.location.Location currentBestLocation)
location - The new Location that you want to evaluatecurrentBestLocation - The current Location fix, to which you want to compare the new onepublic Symbol getSymbol()
public boolean isBearingOn()
public boolean isStarted()
public boolean isAutoPan()
public android.location.LocationListener getLocationListener()
public void setLocationListener(android.location.LocationListener locationListener)
locationListener - the locationListener to setpublic void setAutoPan(boolean autoPan)
autoPan - the flag for the autoPan (default: true)public void setBearing(boolean bearing)
bearing - flag for the bearing (default: true)public void setSymbol(Symbol symbol)
symbol - the symbol to setpublic boolean isAllowNetworkLocation()
public void setAllowNetworkLocation(boolean allowNetworkLocation)
allowNetworkLocation - the flag for the usage of the network (default: true)protected void onDraw(android.graphics.Canvas canvas)
onDraw in class LayerView<LayerModel>protected boolean verifyDrawable(android.graphics.drawable.Drawable who)
verifyDrawable in class android.view.Viewprotected void onDetachedFromWindow()
onDetachedFromWindow in class android.view.Viewpublic void setOnSingleTapListener(OnSingleTapListener onSingleTapListener)
onSingleTapListener - the onSingleTapListener to setpublic OnSingleTapListener getOnSingleTapListener()
protected LayerModel initModel()
throws Exception
LayerViewLayerModel object.
In a Model-View-Controller architecture, the LayerView represents the View and handles the image rendering related functionality. Each View has an associated Model object that handles fetching map images, calculating map bounds, and so on.
Any class that extends the LayerView class should provide an implementation of a LayerModel class and instantiate that model in this method.
initModel in class LayerView<LayerModel>Exceptionprotected void update()
LayerViewAny class that extends the LayerView class should provide an implementation of this method to retrieve updated an updated map from the map service. The TiledLayer and DynamicLayer subclasses provide default implementation for cached and dynamic map services. If you DO NOT need to support other types of map services, then you should not override this default functionality (it will save you a lot of unnecessary development effort).
update in class LayerView<LayerModel>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||