com.nutiteq.android
Class MapView

java.lang.Object
  extended by android.view.View
      extended by com.nutiteq.android.MapView
All Implemented Interfaces:
android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, MapListener

public class MapView
extends android.view.View
implements MapListener

Simple map view handler for displaying map component on screen.


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
 
Fields inherited from class android.view.View
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, KEEP_SCREEN_ON, NO_ID, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, VISIBLE
 
Constructor Summary
MapView(android.content.Context context, android.util.AttributeSet attrs)
           
MapView(android.content.Context context, BasicMapComponent component)
           
 
Method Summary
 void clean()
           
 void mapClicked(WgsPoint p)
          Called when a point on the map is clicked (when place is not selected).
 void mapMoved()
          Called after map has been moved.
 void needRepaint(boolean mapIsComplete)
          Called when the map is changed in some way and repaint needs to be called on the container object.
 boolean onKeyDown(int keyCode, android.view.KeyEvent event)
           
 boolean onKeyUp(int keyCode, android.view.KeyEvent event)
           
 void onSizeChanged(int w, int h, int oldw, int oldh)
           
 boolean onTouchEvent(android.view.MotionEvent event)
           
 void setMapComponent(BasicMapComponent component)
           
 void setOnSizeChangedListener(OnSizeChangedListener listener)
           
 
Methods inherited from class android.view.View
addFocusables, addFocusables, addTouchables, bringToFront, buildDrawingCache, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, clearFocus, computeScroll, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getContentDescription, getContext, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getKeepScreenOn, getKeyDispatcherState, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getTag, getTag, getTop, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getWidth, getViewTreeObserver, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getVisibility, hasFocus, hasFocusable, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPressed, isSaveEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onCheckIsTextEditor, onCreateInputConnection, onFinishTemporaryDetach, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, 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, 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, setWillNotCacheDrawing, setWillNotDraw, setVisibility, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapView

public MapView(android.content.Context context,
               BasicMapComponent component)

MapView

public MapView(android.content.Context context,
               android.util.AttributeSet attrs)
Method Detail

onSizeChanged

public void onSizeChanged(int w,
                          int h,
                          int oldw,
                          int oldh)
Overrides:
onSizeChanged in class android.view.View

setOnSizeChangedListener

public void setOnSizeChangedListener(OnSizeChangedListener listener)

onTouchEvent

public boolean onTouchEvent(android.view.MotionEvent event)
Overrides:
onTouchEvent in class android.view.View

onKeyDown

public boolean onKeyDown(int keyCode,
                         android.view.KeyEvent event)
Specified by:
onKeyDown in interface android.view.KeyEvent.Callback
Overrides:
onKeyDown in class android.view.View

onKeyUp

public boolean onKeyUp(int keyCode,
                       android.view.KeyEvent event)
Specified by:
onKeyUp in interface android.view.KeyEvent.Callback
Overrides:
onKeyUp in class android.view.View

mapClicked

public void mapClicked(WgsPoint p)
Description copied from interface: MapListener
Called when a point on the map is clicked (when place is not selected).

Specified by:
mapClicked in interface MapListener
Parameters:
p - point clicked in WGS84

mapMoved

public void mapMoved()
Description copied from interface: MapListener
Called after map has been moved.

Specified by:
mapMoved in interface MapListener

needRepaint

public void needRepaint(boolean mapIsComplete)
Description copied from interface: MapListener
Called when the map is changed in some way and repaint needs to be called on the container object.

Specified by:
needRepaint in interface MapListener
Parameters:
mapIsComplete - is current map view complete (if FALSE, then some map tiles are not yet downloaded)

setMapComponent

public void setMapComponent(BasicMapComponent component)

clean

public void clean()