Methods of Map()
Method Return Value Description
fitBounds(LatLngBounds) None Sets the viewport to contain the given bounds
getBounds() LatLng,LatLng Returns the south-west latitude/longitude and the north-east latitude/longitude of the current viewport
getCenter() LatLng Returns the lat/lng of the center of the map
getDiv() Node Returns a DOM object that contains the map
getHeading() number Returns the compass heading of aerial imagery (for SATELLITE and HYBRID map types)
getMapTypeId() HYBRID
ROADMAP
SATELLITE
TERRAIN Returns the current map type
getProjection() Projection Returns the current Projection
getStreetView() StreetViewPanorama Returns the default StreetViewPanorama bound to the map
getTilt() number Returns the angle of incidence for aerial imagery in degrees (for SATELLITE and HYBRID map types)
getZoom() number Returns the current zoom level of the map
panBy(xnumber,ynumber) None Changes the center of the map by the given distance in pixels
panTo(LatLng) None Changes the center of the map to the given LatLng
panToBounds(LatLngBounds) None Pans the map by the minimum amount necessary to contain the given LatLngBounds
setCenter(LatLng) None
setHeading(number) None Sets the compass heading for aerial imagery measured in degrees from cardinal direction North
setMapTypeId(MapTypeId) None Changes the kind of map to display
setOptions(MapOptions) None
setStreetView(StreetViewPanorama) None Binds a StreetViewPanorama to the map
setTilt(number) None Sets the angle of incidence for aerial imagery in degrees (for SATELLITE and HYBRID map types)
setZoom(number) None
Properties of Map()
Property Type Description
controls Array. Additional controls to attach to the map
mapTypes MapTypeRegistry A registry of MapType instances by string ID
overlayMapTypes MVCArray. Additional map types to overlay