com.google.android.maps
java.lang.Object android.view.View android.view.ViewGroup com.google.android.maps.MapView
public class MapView
A View which displays a map (with data obtained from the Google Maps service). When focused, it will capture keypresses and touch gestures to pan and zoom the map. It can also be controlled programmatically (getController()
) and can draw a number of Overlay
s on top of the map (getOverlays()
).
The map can be displayed in a number of modes; see setSatellite(boolean)
, setTraffic(boolean)
, and setStreetView(boolean)
. It can optionally display a "reticle" when not it touch-mode, to aid in using pan-to-select; see setReticleDrawMode(com.google.android.maps.MapView.ReticleDrawMode)
. It also draws a Google logo in the bottom-left corner.
The preferred zoom mechanism is the built-in zoom, see setBuiltInZoomControls(boolean)
. As the user pans the map, zoom controls will automatically be shown at the bottom of the MapView.
The MapView is also a ViewGroup, with LayoutParameters allowing you to attach views either to a specific pixel offset, or to a specific latitude/longitude pair.
A MapView can only be constructed (or inflated) by a MapActivity
. This is because it depends on threads which access the network and filesystem in the background; these threads must be shepherded by the lifecycle management in MapActivity
. Tiles are cached on the filesystem in your application's directory. The cache is auto-managed so you don't need to do anything with it, and can delete it at any time.
In order to display Google Maps data in a MapView, you must register with the Google Maps service and obtain a Maps API Key. For information about how to get a Maps API Key, see Obtaining a Maps API Key.
Once you have a Maps API Key, you need to reference it from a special attribute -- android:apiKey
-- in the MapView element in the XML layout. If you are instantiating a MapView directly from code, you should pass the Maps API Key in the MapView constructor.
Nested Class Summary | |
---|---|
static class |
MapView.LayoutParams Per-child layout information associated with MapView. |
static class |
MapView.ReticleDrawMode Allow the user to specify the mode in which the reticle is drawn. |
Nested classes/interfaces inherited from class android.view.ViewGroup |
---|
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener |
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.ViewGroup |
---|
CLIP_TO_PADDING_MASK, FLAG_SUPPORT_STATIC_TRANSFORMATIONS, FLAG_USE_CHILD_DRAWING_ORDER, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, mDisappearingChildren, mGroupFlags, mOnHierarchyChangeListener, mPersistentDrawingCache, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE |
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, FIRST_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, 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, LAST_STATE_SET, mBottom, mContext, mCurrentAnimation, MIDDLE_STATE_SET, mLayoutParams, mLeft, mMeasuredHeight, mMeasuredWidth, mOnClickListener, mOnCreateContextMenuListener, mOnFocusChangeListener, mOnLongClickListener, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mParent, mRight, mScrollX, mScrollY, mTag, mTop, 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_FIRST_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_LAST_STATE_SET, PRESSED_MIDDLE_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_SINGLE_STATE_SET, PRESSED_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, SINGLE_STATE_SET, SOUND_EFFECTS_ENABLED, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET |
Constructor Summary | |
---|---|
MapView(android.content.Context context, android.util.AttributeSet attrs) Constructs a MapView object. |
|
MapView(android.content.Context context, android.util.AttributeSet attrs, int defStyle) Constructs a MapView object. |
|
MapView(android.content.Context context, java.lang.String apiKey) Constructs a MapView object. |
Method Summary | |
---|---|
boolean |
canCoverCenter() Checks whether we currently have a map tile to cover the center of the map. |
protected boolean |
checkLayoutParams(android.view.ViewGroup.LayoutParams p) Just checks if p instanceof MapView.LayoutParams . |
void |
computeScroll() Captures scroll events and uses them to pan the map. |
void |
displayZoomControls(boolean takeFocus) Makes the zoom controls visible and optionally requests focus upon them so they can be accessed via keys. |
protected MapView.LayoutParams |
generateDefaultLayoutParams() Returns a set of layout parameters with a width of ViewGroup.LayoutParams.WRAP_CONTENT , a height of ViewGroup.LayoutParams.WRAP_CONTENT and with the coordinates (0, 0). |
android.view.ViewGroup.LayoutParams |
generateLayoutParams(android.util.AttributeSet attrs) |
protected android.view.ViewGroup.LayoutParams |
generateLayoutParams(android.view.ViewGroup.LayoutParams p) |
MapController |
getController() Returns the MapController for this map, which you can use to control and animate pan and zoom. |
int |
getLatitudeSpan() The current latitude span (from the top edge to the bottom edge of the map) in decimal degrees multiplied by one million. |
int |
getLongitudeSpan() The current longitude span (from the left edge to the right edge of the map) in decimal degrees multiplied by one million. |
GeoPoint |
getMapCenter() Returns the current center-point position of the map, as a GeoPoint (latitude and longitude). |
int |
getMaxZoomLevel() Returns the maximum zoom level for the point currently at the center. |
java.util.List<Overlay> |
getOverlays() Access the overlay list. |
Projection |
getProjection() Get a projection for converting between screen-pixel coordinates and latitude/longitude coordinates. |
android.view.View |
getZoomControls() Deprecated. The built-in zoom mechanism is preferred, see setBuiltInZoomControls(boolean) . |
int |
getZoomLevel() Returns the current zoom level of the map. |
boolean |
isSatellite() Checks whether the map is in "satellite" image mode. |
boolean |
isStreetView() Checks whether the map is drawing street view availability (blue outlines). |
boolean |
isTraffic() Checks whether the map is drawing traffic where available. |
protected void |
onDetachedFromWindow() Called when being detached, clean up the zoom controls. |
protected void |
onDraw(android.graphics.Canvas canvas) The main draw method. |
void |
onFocusChanged(boolean hasFocus, int direction, android.graphics.Rect unused) Called by the view system when the focus state of this view changes. |
boolean |
onKeyDown(int keyCode, android.view.KeyEvent event) Passes keys to the overlays first, and if they don't handle them, try using them to pan. |
boolean |
onKeyUp(int keyCode, android.view.KeyEvent event) Passes keys to the overlays first, and if they don't handle them, try using them to pan. |
protected void |
onLayout(boolean changed, int left, int top, int right, int bottom) |
protected void |
onMeasure(int widthMeasureSpec, int heightMeasureSpec) |
void |
onRestoreInstanceState(android.os.Bundle state) Restores the state of the MapView to a Bundle. |
void |
onSaveInstanceState(android.os.Bundle state) Saves the state of the MapView to a Bundle. |
protected void |
onSizeChanged(int w, int h, int oldw, int oldh) This resizes the map object and repositions the reticle. |
boolean |
onTouchEvent(android.view.MotionEvent ev) Passes trackball events to the overlays first, and if they don't handle them, feed it to a gesture detector, and dispatch the detected gestures. |
boolean |
onTrackballEvent(android.view.MotionEvent event) Passes trackball events to the overlays first, and if they don't handle them, try using them to pan and "tap". |
void |
onWindowFocusChanged(boolean hasFocus) Called when the window containing this view gains or loses focus. |
void |
preLoad() Preload the tiles at the map's current center. |
void |
setBuiltInZoomControls(boolean on) Sets whether to enable the built-in zoom controls. |
void |
setReticleDrawMode(MapView.ReticleDrawMode mode) Specify how the reticle should be drawn when the device is not in touch mode. |
void |
setSatellite(boolean on) Sets the map mode to "satellite" mode, loading tiles of aerial imagery with roads and names superimposed. |
void |
setStreetView(boolean on) Control whether Street View availability (blue outlines) is shown on the map. |
void |
setTraffic(boolean on) Control whether traffic is shown on the map. |
Methods inherited from class android.view.ViewGroup |
---|
addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchDraw, dispatchFreezeSelfOnly, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, findFocus, findViewTraversal, findViewWithTagTraversal, fitSystemWindows, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getPersistentDrawingCache, hasFocus, hasFocusable, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawnWithCacheEnabled, measureChild, measureChildren, measureChildWithMargins, offsetChildrenTopAndBottom, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onCreateDrawableState, onInterceptTouchEvent, onRequestFocusInDescendants, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setOnHierarchyChangeListener, setPadding, setPersistentDrawingCache, setStaticTransformationsEnabled, showContextMenuForChild, startLayoutAnimation, updateViewLayout |
Methods inherited from class android.view.View |
---|
applyDrawableToTransparentRegion, bringToFront, buildDrawingCache, cancelLongPress, checkInputConnectionProxy, clearAnimation, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, debug, debugIndent, destroyDrawingCache, draw, finalize, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, 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, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isPaddingOffsetRequired, isPressed, isRootNamespace, isSaveEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVerticalScrollBarHidden, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCheckIsTextEditor, onCreateContextMenu, onCreateInputConnection, onFinishInflate, onFinishTemporaryDetach, onKeyMultiple, onKeyPreIme, onKeyShortcut, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onWindowVisibilityChanged, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setFrame, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setIsRootNamespace, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPressed, setSaveEnabled, setScrollBarStyle, setScrollContainer, setSelected, setSoundEffectsEnabled, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDraw |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface android.view.ViewParent |
---|
createContextMenu, getParent, isLayoutRequested, requestLayout |
Constructor Detail |
---|
public MapView(android.content.Context context, java.lang.String apiKey)
context
- A
MapActivity
object.
apiKey
- A Google Maps API Key. See Obtaining a Maps API Key for complete information.
java.lang.IllegalArgumentException
- if the enclosing context is not an instance of
MapActivity
.
public MapView(android.content.Context context, android.util.AttributeSet attrs)
context
- A
MapActivity
object.
attrs
- An attribute set; currently no attributes are used.
java.lang.IllegalArgumentException
- if the enclosing context is not an instance of
MapActivity
.
public MapView(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
context
- A
MapActivity
object.
attrs
- An attribute set; we currently have no attributes.
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.
java.lang.IllegalArgumentException
- if the enclosing context is not an instance of
MapActivity
, or if the attributes do not include an apiKey.
Method Detail |
---|
protected void onSizeChanged(int w, int h, int oldw, int oldh)
onSizeChanged
in class
android.view.View
protected void onDetachedFromWindow()
onDetachedFromWindow
in class
android.view.View
public void computeScroll()
computeScroll
in class
android.view.View
protected final void onDraw(android.graphics.Canvas canvas)
onDraw
in class
android.view.View
protected final void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
onMeasure
in class
android.view.View
public void onWindowFocusChanged(boolean hasFocus)
onWindowFocusChanged
in class
android.view.View
public void onFocusChanged(boolean hasFocus, int direction, android.graphics.Rect unused)
onFocusChanged
in class
android.view.View
public boolean onKeyDown(int keyCode, android.view.KeyEvent event)
onKeyDown
in interface
android.view.KeyEvent.Callback
onKeyDown
in class
android.view.View
public boolean onKeyUp(int keyCode, android.view.KeyEvent event)
onKeyUp
in interface
android.view.KeyEvent.Callback
onKeyUp
in class
android.view.View
public boolean onTrackballEvent(android.view.MotionEvent event)
onTrackballEvent
in class
android.view.View
public boolean onTouchEvent(android.view.MotionEvent ev)
View.isEnabled()
or is not
View.isClickable()
.
onTouchEvent
in class
android.view.View
protected MapView.LayoutParams generateDefaultLayoutParams()
ViewGroup.LayoutParams.WRAP_CONTENT
, a height of
ViewGroup.LayoutParams.WRAP_CONTENT
and with the coordinates (0, 0).
generateDefaultLayoutParams
in class
android.view.ViewGroup
protected void onLayout(boolean changed, int left, int top, int right, int bottom)
onLayout
in class
android.view.ViewGroup
public android.view.ViewGroup.LayoutParams generateLayoutParams(android.util.AttributeSet attrs)
generateLayoutParams
in class
android.view.ViewGroup
protected boolean checkLayoutParams(android.view.ViewGroup.LayoutParams p)
MapView.LayoutParams
.
checkLayoutParams
in class
android.view.ViewGroup
p
- The LayoutParams object to verify.
protected android.view.ViewGroup.LayoutParams generateLayoutParams(android.view.ViewGroup.LayoutParams p)
generateLayoutParams
in class
android.view.ViewGroup
public void displayZoomControls(boolean takeFocus)
takeFocus
- If true, bring the zoom controls into focus. If false, do not bring controls into focus.
public boolean canCoverCenter()
public void preLoad()
public int getZoomLevel()
public void setSatellite(boolean on)
on
- If true, turn satellite tiles on. If false, turn regular map tiles on.
public boolean isSatellite()
public void setTraffic(boolean on)
on
- If true, turn traffic lines on. If false, turn them off.
public boolean isTraffic()
public void setStreetView(boolean on)
on
- If true, turn street view availability on. If false, turn them off.
public boolean isStreetView()
public GeoPoint getMapCenter()
public MapController getController()
public final java.util.List<Overlay> getOverlays()
Overlay
s in this list will be drawn (in increasing order) and will receive events (in decreasing order, until one returns true). If you modify the list, you will probably want to call
View.postInvalidate()
so that the change will be made visible to the user.
Collections.synchronizedList(java.util.List)
; thus feel free to query it or modify it as you see fit and the changes will be reflected on the next draw or event. However, if you iterate over it, the entire loop should be enclosed in a block synchronizing on the list.
public int getLatitudeSpan()
public int getLongitudeSpan()
public void setReticleDrawMode(MapView.ReticleDrawMode mode)
mode
- The reticle draw mode. Valid values are:
MapView.ReticleDrawMode.DRAW_RETICLE_OVER
- this is the default mode and in this mode the reticle will be drawn over all the overlays so it's always visible.
MapView.ReticleDrawMode.DRAW_RETICLE_UNDER
- the reticle will be drawn before all the overlays are drawn meaning the reticle is there but if any object is drawn at the same position it will cover the reticle.
MapView.ReticleDrawMode.DRAW_RETICLE_NEVER
- the reticle is not drawn
public int getMaxZoomLevel()
public void onSaveInstanceState(android.os.Bundle state)
state
- The Bundle to maintain the current state.
public void onRestoreInstanceState(android.os.Bundle state)
state
- The Bundle with the prior instance state.
@Deprecated
public android.view.View getZoomControls()
setBuiltInZoomControls(boolean)
.
ViewGroup.addView(View)
is the common way to add this View to the screen.
API version 3 introduces a built-in zoom mechanism that is shown automatically by the MapView. This is the preferred approach for showing the zoom UI.
public void setBuiltInZoomControls(boolean on)
on
- Whether the built-in zoom controls are enabled. If false, the client handles showing the UI for zoom controls.
public Projection getProjection()