Google Maps API Reference manual (vii)

Source: Internet
Author: User
Tags in degrees polyline

Google Maps API Reference manual Map
Constructors/Objects Description
Map () Creates a new map in the specified HTML container, which is typically a DIV element.
Overlay Layer
Constructors/Objects Description
Marker Create a tag.
Markeroptions The option to mark. All markup rendered by Directionsrenderer will use these options.
Markerimage A structure representing a Marker icon or shadow image
Markershape Defines the marker shape to use in determination of a marker ' s clickable region (type and coord)
Animation Specifies animations that can is played on a marker (bounce or drop)
Infowindow Creates an Info window
Infowindowoptions Options for rendering the Info window
Polyline Creates a polyline (contains path and stroke styles)
Polylineoptions Options for rendering the polyline
Polygon Creates a polygon (contains path and Stroke+fill styles)
Polygonoptions Options for rendering the polygon
Rectangle Creates a rectangle (contains bounds and Stroke+fill styles)
Rectangleoptions Options for rendering the rectangle
Circle Creates a circle (contains Center+radius and Stroke+fill styles)
Circleoptions Options for rendering the circle
Groundoverlay
Groundoverlayoptions
Overlayview
Mappanes
MapCanvasProjection
Event
Constructors/Objects Description
Mapseventlistener It has no methods and no constructor. Its instances is returned from AddListener (), Adddomlistener () and is eventually passed back to RemoveListener ()
Event Adds/removes/trigger Event Listeners
MouseEvent Returned from various mouse events on the map and overlays
Control set
Constructors/Objects Description
Maptypecontroloptions Holds options for modifying a control (position and style)
Maptypecontrolstyle Specifies what kind of the map control to display (Drop-down menu or buttons)
Overviewmapcontroloptions Options for rendering of the overview map control (opened or collapsed)
Pancontroloptions Options for rendering of the Pan control (position)
Rotatecontroloptions Options for rendering of the Rotate control (position)
Scalecontroloptions Options for rendering of the scale control (position and style)
Scalecontrolstyle Specifies what kind the scale control to display
Streetviewcontroloptions Options for rendering of the Street View Pegman control (position)
Zoomcontroloptions Options for rendering of the zoom control (position and style)
Zoomcontrolstyle Specifies kind of zoom control to display (large or small)
Controlposition Specifies the placement of controls on the map

Maps API map () Builder:

Definition and usage

The map () constructor creates a new map and inserts it into the specified HTML element (<div> element).

Syntax New Google.maps.Map ( HtmlElement, mapoptions) parameter values
Parameters Description
HtmlElement Specify that you want to place the map in that HTML element.
Mapoptions Mapoptions object with Map initialization variable/option.
Method of Map ()
Method return value Description
Fitbounds (latlngbounds) None Sets the viewport to contain a given boundary.
GetBounds () Latlng,latlng Returns the southwest latitude/longitude and northeast latitude/longitude of the current viewport.
Getcenter () Latlng Returns the latitude/longitude of the center of the map.
Getdiv () Node Returns the DOM object that contains the map.
Getheading () Number Returns the compass heading of the aerial image (supports satellite and HYBRID map types).
Getmaptypeid () HYBRID Roadmap Satellite TERRAIN Returns the current map type.
Getprojection () Projection Returns the current Projection (projection).
Getstreetview () Streetviewpanorama Returns the default Streetviewpanorama bound to the map.
Gettilt () Number Returns the number of incident angles (supports satellite and HYBRID map types) for aerial images.
Getzoom () Number Returns the current zoom level of the map.
Panby (xnumber,ynumber) None Changes the center of the map by a given distance in pixels.
Panto (latlng) None Change the center of the map for a given latlng.
Pantobounds (latlngbounds) None The minimum distance required to pan the map to include the given latlngbounds.
SetCenter (latlng) None
Setheading (number) None Set the compass direction of the aerial image (measured in degrees), in the basic direction north.
Setmaptypeid (Maptypeid) None Change the type of map you want to display.
SetOptions (mapoptions) None
Setstreetview (Streetviewpanorama) None Bind a Streetviewpanorama to the map.
Settilt (number) None Sets the number of incident angles for aerial images (supports satellite and HYBRID map types).
Setzoom (number) None
The properties of Map ()
Properties type Description
Controls Array.<mvcarray.<node>> The extra controls to attach to the map.
Maptypes Maptyperegistry The registry for the Maptype instance, broken down by string ID.
Overlaymaptypes Mvcarray.<maptype> The extra map type to overlay.
Events for Map ()
Events Parameters Description
Bounds_changed None This event is triggered when the visual area range changes.
Center_changed None This event is triggered when the local map Center (center) property is changed.
Click MouseEvent This event is triggered when the user taps the map (but not the click Mark or Info window).
DblClick MouseEvent This event is triggered when the user double-clicks the map. Note that a Click event is also triggered before this event is triggered.
Drag None This event is triggered repeatedly when a user drags a map.
Dragend None This event is triggered when the user stops dragging the map.
DragStart None This event is triggered when the user starts to drag the map.
Heading_changed None This event is triggered when the local figure heading (direction) property changes.
Idle None This event is triggered when the map becomes idle after panning or zooming.
Maptypeid_changed None This event is triggered when the Maptypeid property is changed.
MouseMove MouseEvent This event is triggered as long as the user's mouse moves on the map container.
Mouseout MouseEvent This event is triggered when the user's mouse exits from the map container.
MouseOver MouseEvent This event is triggered when the user's mouse enters the map container.
Projection_changed None This event is triggered when the projection changes.
Resize None This event is triggered when a local chart (div) changes size.
RightClick MouseEvent This event is triggered when the user right-clicks the map.
tilesloaded None This event is triggered when the visible tile is loaded.
Tilt_changed None This event is triggered when the local figure tilt (skew) property changes.
Zoom_changed None This event is triggered when the local map zoom property changes.

Google Maps API Reference manual (vii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.