10 09/2014

google map options

最后更新: Wed Sep 10 2014 12:36:06 GMT+0800

google.maps.MapOptions 参数

backgroundColorstringColor 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.
centerLatLngThe initial Map center. Required.
disableDefaultUIbooleanEnables/disables all default UI. May be overridden individually.
disableDoubleClickZoombooleanEnables/disables zoom and center on double click. Enabled by default.
draggablebooleanIf false, prevents the map from being dragged. Dragging is enabled by default.
draggableCursorstringThe name or url of the cursor to display when mousing over a draggable map.
draggingCursorstringThe name or url of the cursor to display when the map is being dragged.
headingnumberThe 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.
keyboardShortcutsbooleanIf false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.
mapMakerbooleanTrue if Map Maker tiles should be used instead of regular tiles.
mapTypeControlbooleanThe initial enabled/disabled state of the Map type control.
mapTypeControlOptionsMapTypeControlOptionsThe initial display options for the Map type control.
mapTypeIdMapTypeIdThe initial Map mapTypeId. Defaults to ROADMAP.
maxZoomnumberThe 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.
minZoomnumberThe 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.
noClearbooleanIf true, do not clear the contents of the Map div.
overviewMapControlbooleanThe enabled/disabled state of the Overview Map control.
overviewMapControlOptionsOverviewMapControlOptionsThe display options for the Overview Map control.
panControlbooleanThe enabled/disabled state of the Pan control.
panControlOptionsPanControlOptionsThe display options for the Pan control.
rotateControlbooleanThe enabled/disabled state of the Rotate control.
rotateControlOptionsRotateControlOptionsThe display options for the Rotate control.
scaleControlbooleanThe initial enabled/disabled state of the Scale control.
scaleControlOptionsScaleControlOptionsThe initial display options for the Scale control.
scrollwheelbooleanIf false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.
streetViewStreetViewPanoramaA 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.
streetViewControlbooleanThe 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).
streetViewControlOptionsStreetViewControlOptionsThe initial display options for the Street View Pegman control.
stylesArray.<MapTypeStyle>Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain modes, these styles will only apply to labels and geometry.
tiltnumberControls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45. The value 0 causes the map to always use a 0° overhead view regardless of the zoom level and viewport. The value 45 causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for SATELLITE and HYBRID map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value specified by this option. Because getTilt and this option refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects.
zoomnumberThe initial Map zoom level. Required.
zoomControlbooleanThe enabled/disabled state of the Zoom control.
zoomControlOptionsZoomControlOptionsThe display options for the Zoom control.

via google map doc