Follow us on GitHub

com.google.gwt.maps.client
Class MapOptions

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.MapOptions

public class MapOptions
extends JavaScriptObject

Map rendering options
Note: Defaults to LatLng(26.4,-9)

See MapOptions API Doc


Constructor Summary
protected MapOptions()
          This will tell the map how to render and with with what features
Use newInstance();
 
Method Summary
 String getBackgroundColor()
          get Color used for the background of the Map div.
 LatLng getCenter()
          get LatLng
 boolean getDisableDefaultUi()
          get Enables/disables all default UI.
 boolean getDisableDoubleClickZoom()
          get enables/disables zoom and center on double click.
 boolean getDraggable()
          get If false, prevents the map from being dragged.
 boolean getDraggableCursor()
          get The name or url of the cursor to display on a draggable object.
 boolean getDraggingCursor()
          get The name or url of the cursor to display when an object is dragging.
 int getHeading()
          get The heading for aerial imagery in degrees measured clockwise from cardinal direction North.
 boolean getKeyboardShortcuts()
          get If false, prevents the map from being controlled by the keyboard.
 boolean getMapTypeControl()
          get The initial enabled/disabled state of the Map type control.
 MapTypeControlOptions getMapTypeControlOptions()
          get The initial display options for the Map type control.
 MapTypeId getMapTypeId()
          Get MapTypeId
 String getMapTypeIdString()
          Get mapTypeId string
 MapTypeStyle[] getMapTypeStyles()
          get set Styles to apply to each of the default map types.
 int getMaxZoom()
          get maxZoom
 int getMinZoom()
          get The minimum zoom level which will be displayed on the map.
 boolean getNoClear()
          get If true, do not clear the contents of the Map div.
 boolean getOverviewMapControl()
          get The enabled/disabled state of the Overview Map control.
 OverviewMapControlOptions getOverviewMapControlOptions()
          get The display options for the Overview Map control.
 boolean getPanControl()
          get The enabled/disabled state of the Pan control.
 PanControlOptions getPanControlOptions()
          gets The display options for the Pan control.
 boolean getRotateControl()
          get The enabled/disabled state of the Rotate control.
 RotateControlOptions getRotateControlOptions()
          get set The display options for the Rotate control.
 boolean getScaleControl()
          get The initial enabled/disabled state of the Scale control.
 ScaleControlOptions getScaleControlOptions()
          get The initial display options for the Scale control.
 boolean getScrollWheel()
          get If false, disables scrollwheel zooming on the map.
 boolean getStreetViewControl()
          get set A StreetViewPanorama to display when the Street View pegman is dropped on the map.
 StreetViewControlOptions getStreetViewControlOptions()
          get The initial enabled/disabled state of the Street View Pegman control.
 int getTilt()
          gets The angle of incidence of the map as measured in degrees from the viewport plane to the map plane.
 int getZoom()
          get Map zoom level
 boolean getZoomControl()
          gets The enabled/disabled state of the Zoom control.
 ZoomControlOptions getZoomControlOptions()
          gets The display options for the Zoom control.
static MapOptions newInstance()
          Create a new Instance of the MapOptions This will also create a defaults center, mapTypeId and Zoom
static MapOptions newInstance(boolean withdefaults)
          Create a new Instance of the MapOptions
 void setBackgroundColor(String backgroundColor)
          set Color used for the background of the Map div.
 void setCenter(LatLng center)
          set The initial Map center.
 void setDisableDefaultUi(boolean disableDefaultUI)
          set Enables/disables all default UI.
 void setDisableDoubleClickZoom(boolean disableDoubleClickZoom)
          set Enables/disables zoom and center on double click.
 void setDraggable(boolean draggable)
          set If false, prevents the map from being dragged.
 void setDraggableCursor(boolean draggableCursor)
          set The name or url of the cursor to display on a draggable object.
 void setDraggingCursor(boolean draggingCursor)
          set The name or url of the cursor to display when an object is dragging.
 void setHeading(int heading)
          set The heading for aerial imagery in degrees measured clockwise from cardinal direction North.
 void setKeyboardShortcuts(boolean keyboardShortcuts)
          set If false, prevents the map from being controlled by the keyboard.
 void setMapTypeControl(boolean mapTypeControl)
          set The initial enabled/disabled state of the Map type control.
 void setMapTypeControlOptions(MapTypeControlOptions mapTypeControlOptions)
          set The initial display options for the Map type control.
 void setMapTypeId(MapTypeId mapTypeId)
          The initial Map MapTypeId.
 void setMapTypeId(String mapTypeId)
          The initial Map MapTypeId.
 void setMapTypeStyles(MapTypeStyle[] styles)
           
 void setMaxZoom(int maxZoom)
          set The maximum zoom level which will be displayed on the map.
 void setMinZoom(int minZoom)
          set The minimum zoom level which will be displayed on the map.
 void setNoClear(boolean noClear)
          set If true, do not clear the contents of the Map div.
 void setOverviewMapControl(boolean overviewMapControl)
          set The enabled/disabled state of the Overview Map control.
 void setOverviewMapControlOptions(OverviewMapControlOptions overviewMapControlOptions)
          set The display options for the Overview Map control.
 void setPanControl(boolean panControl)
          The enabled/disabled state of the Pan control.
 void setPanControlOptions(PanControlOptions panControlOptions)
          sets The display options for the Pan control.
 void setRotateControl(boolean rotateControl)
          set The enabled/disabled state of the Rotate control.
 void setRotateControlOptions(RotateControlOptions rotateControlOptions)
          set The display options for the Rotate control.
 void setScaleControl(boolean scaleControl)
          set The initial enabled/disabled state of the Scale control.
 void setScaleControlOptions(ScaleControlOptions scaleControlOptions)
          set The initial display options for the Scale control.
 void setScrollWheel(boolean scrollWheel)
          set If false, disables scrollwheel zooming on the map.
 void setStreetViewControl(boolean streetViewControl)
          set A StreetViewPanorama to display when the Street View Pegman is dropped on the map.
 void setStreetViewControlOptions(StreetViewControlOptions streetViewControlOptions)
          The initial enabled/disabled state of the Street View Pegman control.
 void setTilt(int tilt)
          sets The angle of incidence of the map as measured in degrees from the viewport plane to the map plane.
 void setZoom(int zoom)
          The initial Map zoom level.
 void setZoomControl(boolean zoomControl)
          sets The enabled/disabled state of the Zoom control.
 void setZoomControlOptions(ZoomControlOptions zoomControlOptions)
          sets The display options for the Zoom control.
 String toString2()
           
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapOptions

protected MapOptions()
This will tell the map how to render and with with what features
Use newInstance();

Method Detail

newInstance

public static final MapOptions newInstance()
Create a new Instance of the MapOptions This will also create a defaults center, mapTypeId and Zoom

Returns:
MapOptions

newInstance

public static final MapOptions newInstance(boolean withdefaults)
Create a new Instance of the MapOptions

Parameters:
withdefaults - - [true]= setup required defaults, center, mapTypeId and Zoom. [false]= will not use defaults
Returns:
MapOptions

setBackgroundColor

public final void setBackgroundColor(String backgroundColor)
set Color used for the background of the Map div. This color will be visible when tiles have not yet loaded as the user pans. This option can only be set when the map is initialized.

Parameters:
backgroundColor -

getBackgroundColor

public final String getBackgroundColor()
get Color used for the background of the Map div.


setCenter

public final void setCenter(LatLng center)
set The initial Map center. Required.

Parameters:
center - LatLng

getCenter

public final LatLng getCenter()
get LatLng

Returns:
LatLng

setDisableDefaultUi

public final void setDisableDefaultUi(boolean disableDefaultUI)
set Enables/disables all default UI. May be overridden individually.

Parameters:
disableDefaultUI -

getDisableDefaultUi

public final boolean getDisableDefaultUi()
get Enables/disables all default UI. May be overridden individually.

Returns:
boolean

setDisableDoubleClickZoom

public final void setDisableDoubleClickZoom(boolean disableDoubleClickZoom)
set Enables/disables zoom and center on double click. Enabled by default.

Parameters:
disableDoubleClickZoom -

getDisableDoubleClickZoom

public final boolean getDisableDoubleClickZoom()
get enables/disables zoom and center on double click. Enabled by default.

Returns:
boolean

setDraggable

public final void setDraggable(boolean draggable)
set If false, prevents the map from being dragged. Dragging is enabled by default.

Parameters:
draggable -

getDraggable

public final boolean getDraggable()
get If false, prevents the map from being dragged. Dragging is enabled by default.

Returns:
boolean

setDraggableCursor

public final void setDraggableCursor(boolean draggableCursor)
set The name or url of the cursor to display on a draggable object.

Parameters:
draggableCursor -

getDraggableCursor

public final boolean getDraggableCursor()
get The name or url of the cursor to display on a draggable object.


setDraggingCursor

public final void setDraggingCursor(boolean draggingCursor)
set The name or url of the cursor to display when an object is dragging.

Parameters:
draggingCursor -

getDraggingCursor

public final boolean getDraggingCursor()
get The name or url of the cursor to display when an object is dragging.


setHeading

public final void setHeading(int heading)
set The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available.

Parameters:
heading -

getHeading

public final int getHeading()
get The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available.

Returns:
int

setKeyboardShortcuts

public final void setKeyboardShortcuts(boolean keyboardShortcuts)
set If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.

Parameters:
keyboardShortcuts -

getKeyboardShortcuts

public final boolean getKeyboardShortcuts()
get If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.

Returns:
boolean

setMapTypeControl

public final void setMapTypeControl(boolean mapTypeControl)
set The initial enabled/disabled state of the Map type control.

Parameters:
mapTypeControl -

getMapTypeControl

public final boolean getMapTypeControl()
get The initial enabled/disabled state of the Map type control.


setMapTypeControlOptions

public final void setMapTypeControlOptions(MapTypeControlOptions mapTypeControlOptions)
set The initial display options for the Map type control.

Parameters:
mapTypeControlOptions -

getMapTypeControlOptions

public final MapTypeControlOptions getMapTypeControlOptions()
get The initial display options for the Map type control.

Returns:
MapTypeControlOptions

setMapTypeId

public final void setMapTypeId(MapTypeId mapTypeId)
The initial Map MapTypeId. Required.

Parameters:
mapTypeId - MapTypeId

setMapTypeId

public final void setMapTypeId(String mapTypeId)
The initial Map MapTypeId. Required.

Parameters:
mapTypeId - String

getMapTypeId

public final MapTypeId getMapTypeId()
Get MapTypeId


getMapTypeIdString

public final String getMapTypeIdString()
Get mapTypeId string


setMaxZoom

public final void setMaxZoom(int maxZoom)
set The maximum zoom level which will be displayed on the map. If omitted, or set to null, the maximum zoom from the current map type is used instead.

Parameters:
maxZoom -

getMaxZoom

public final int getMaxZoom()
get maxZoom

Returns:
int

setMinZoom

public final void setMinZoom(int minZoom)
set The minimum zoom level which will be displayed on the map. If omitted, or set to null, the minimum zoom from the current map type is used instead.

Parameters:
minZoom -

getMinZoom

public final int getMinZoom()
get The minimum zoom level which will be displayed on the map. If omitted, or set to null, the minimum zoom from the current map type is used instead.


setNoClear

public final void setNoClear(boolean noClear)
set If true, do not clear the contents of the Map div.

Parameters:
noClear -

getNoClear

public final boolean getNoClear()
get If true, do not clear the contents of the Map div.


setOverviewMapControl

public final void setOverviewMapControl(boolean overviewMapControl)
set The enabled/disabled state of the Overview Map control.

Parameters:
overviewMapControl -

getOverviewMapControl

public final boolean getOverviewMapControl()
get The enabled/disabled state of the Overview Map control.


setOverviewMapControlOptions

public final void setOverviewMapControlOptions(OverviewMapControlOptions overviewMapControlOptions)
set The display options for the Overview Map control. OverviewMapControlOptions

Parameters:
overviewMapControlOptions -

getOverviewMapControlOptions

public final OverviewMapControlOptions getOverviewMapControlOptions()
get The display options for the Overview Map control.

Returns:
OverviewMapControlOptions

setPanControl

public final void setPanControl(boolean panControl)
The enabled/disabled state of the Pan control.

Parameters:
panControl -

getPanControl

public final boolean getPanControl()
get The enabled/disabled state of the Pan control.

Returns:
boolean

setPanControlOptions

public final void setPanControlOptions(PanControlOptions panControlOptions)
sets The display options for the Pan control.

Parameters:
panControlOptions - PanControlOptions

getPanControlOptions

public final PanControlOptions getPanControlOptions()
gets The display options for the Pan control.

Returns:
PanControlOptions

setRotateControl

public final void setRotateControl(boolean rotateControl)
set The enabled/disabled state of the Rotate control.

Parameters:
rotateControl -

getRotateControl

public final boolean getRotateControl()
get The enabled/disabled state of the Rotate control.


setRotateControlOptions

public final void setRotateControlOptions(RotateControlOptions rotateControlOptions)
set The display options for the Rotate control.

Parameters:
rotateControlOptions - RotateControlOptions

getRotateControlOptions

public final RotateControlOptions getRotateControlOptions()
get set The display options for the Rotate control.

Returns:
RotateControlOptions

setScaleControl

public final void setScaleControl(boolean scaleControl)
set The initial enabled/disabled state of the Scale control.

Parameters:
scaleControl -

getScaleControl

public final boolean getScaleControl()
get The initial enabled/disabled state of the Scale control.

Returns:
boolean

setScaleControlOptions

public final void setScaleControlOptions(ScaleControlOptions scaleControlOptions)
set The initial display options for the Scale control.

Parameters:
scaleControlOptions - ScaleControlOptions

getScaleControlOptions

public final ScaleControlOptions getScaleControlOptions()
get The initial display options for the Scale control.

Returns:
ScaleControlOptions

setScrollWheel

public final void setScrollWheel(boolean scrollWheel)
set If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.

Parameters:
scrollWheel -

getScrollWheel

public final boolean getScrollWheel()
get If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.


setStreetViewControl

public final void setStreetViewControl(boolean streetViewControl)
set A StreetViewPanorama to display when the Street View Pegman is dropped on the map. If no panorama is specified, a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped.

Parameters:
streetViewControl -

getStreetViewControl

public final boolean getStreetViewControl()
get set A StreetViewPanorama to display when the Street View pegman is dropped on the map. If no panorama is specified, a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped.


setStreetViewControlOptions

public final void setStreetViewControlOptions(StreetViewControlOptions streetViewControlOptions)
The initial enabled/disabled state of the Street View Pegman control. This control is part of the default UI, and should be set to false when displaying a map type on which the Street View road overlay should not appear (e.g. a non-Earth map type).

Parameters:
streetViewControlOptions - StreetViewControlOptions

getStreetViewControlOptions

public final StreetViewControlOptions getStreetViewControlOptions()
get The initial enabled/disabled state of the Street View Pegman control. This control is part of the default UI, and should be set to false when displaying a map type on which the Street View road overlay should not appear (e.g. a non-Earth map type).

Returns:
StreetViewControlOptions

setMapTypeStyles

public final void setMapTypeStyles(MapTypeStyle[] styles)

getMapTypeStyles

public final MapTypeStyle[] getMapTypeStyles()
get set Styles to apply to each of the default map types. Note that styles will apply only to the labels and geometry in Satellite/Hybrid and Terrain modes.


setTilt

public final void setTilt(int tilt)
sets The angle of incidence of the map as measured in degrees from the viewport plane to the map plane. The only currently supported values are 0, indicating no angle of incidence (no tilt), and 45, indicating a tilt of 45°. 45° imagery is only available for SATELLITE and HYBRID map types, within some locations, and at some zoom levels.


getTilt

public final int getTilt()
gets The angle of incidence of the map as measured in degrees from the viewport plane to the map plane. The only currently supported values are 0, indicating no angle of incidence (no tilt), and 45, indicating a tilt of 45°. 45° imagery is only available for SATELLITE and HYBRID map types, within some locations, and at some zoom levels.


setZoom

public final void setZoom(int zoom)
The initial Map zoom level. Required.

Parameters:
zoom -

getZoom

public final int getZoom()
get Map zoom level

Returns:
int

setZoomControl

public final void setZoomControl(boolean zoomControl)
sets The enabled/disabled state of the Zoom control.

Parameters:
zoomControl -

getZoomControl

public final boolean getZoomControl()
gets The enabled/disabled state of the Zoom control.


setZoomControlOptions

public final void setZoomControlOptions(ZoomControlOptions zoomControlOptions)
sets The display options for the Zoom control.

Parameters:
zoomControlOptions -

getZoomControlOptions

public final ZoomControlOptions getZoomControlOptions()
gets The display options for the Zoom control.


toString2

public final String toString2()


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.