OpenLayers. | |
Constants | |
MIN_ZOOM_LEVEL | {Integer} 0 |
MAX_ZOOM_LEVEL | {Integer} 21 |
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection |
Properties | |
type | {GMapType} |
wrapDateLine | {Boolean} Allow user to pan forever east/west. |
sphericalMercator | {Boolean} Should the map act as a mercator-projected map? |
version | {Number} The version of the Google Maps API |
Constructor | |
OpenLayers. | |
Functions | |
clone | Create a clone of this layer |
setVisibility | Set the visibility flag for the layer and hide/show & redraw accordingly. |
display | Hide or show the Layer |
moveTo | |
setOpacity | Sets the opacity for the entire layer (all images) |
destroy | Clean up this layer. |
removeGMapElements | Remove all elements added to the dom. |
removeMap | On being removed from the map, also remove termsOfUse and poweredBy divs |
getOLBoundsFromMapObjectBounds | |
getWarningHTML | {String} String with information on why layer is broken, how to get it working. |
getMapObjectCenter | {Object} The mapObject’s current center in Map Object format |
getMapObjectZoom | {Integer} The mapObject’s current zoom, in Map Object format |
getLongitudeFromMapObjectLonLat | |
getLatitudeFromMapObjectLonLat | |
getXFromMapObjectPixel | |
getYFromMapObjectPixel | |
Properties | |
OpenLayers. | {Object} Cache for elements that should only be created once per map. |
Constants | |
OpenLayers. | Mixin providing functionality specific to the Google Maps API v2. |
Properties | |
termsOfUse | {DOMElement} Div for Google’s copyright and terms of use link |
poweredBy | {DOMElement} Div for Google’s powered by logo and link |
dragObject | {GDraggableObject} Since 2.93, Google has exposed the ability to get the maps GDraggableObject. |
Functions | |
loadMapObject | Load the GMap and register appropriate event listeners. |
onMapResize | |
setGMapVisibility | Display the GMap container and associated elements. |
getMapContainer | {DOMElement} the GMap container’s div |
getMapObjectBoundsFromOLBounds | |
setMapObjectCenter | Set the mapObject to the specified center and zoom |
dragPanMapObject | |
getMapObjectLonLatFromMapObjectPixel | |
getMapObjectPixelFromMapObjectLonLat | |
getMapObjectZoomFromMapObjectBounds | |
getMapObjectLonLatFromLonLat | |
getMapObjectPixelFromXY |
{Boolean} Allow user to pan forever east/west. Default is true. Setting this to false only restricts panning if sphericalMercator is true.
clone: function()
Create a clone of this layer
{OpenLayers.Layer.Google} An exact clone of this layer
setVisibility: function( visible )
Set the visibility flag for the layer and hide/show & redraw accordingly. Fire event unless otherwise specified
Note that visibility is no longer simply whether or not the layer’s style.display is set to “block”. Now we store a ‘visibility’ state property on the layer class, this allows us to remember whether or not we desire for a layer to be visible. In the case where the map’s resolution is out of the layer’s range, this desire may be subverted.
visible | {Boolean} Display the layer (if in range) |
moveTo: function( bounds, zoomChanged, dragging )
bound | {OpenLayers.Bounds} |
zoomChanged | {Boolean} Tells when zoom has changed, as layers have to do some init work in that case. |
dragging | {Boolean} |
removeMap: function( map )
On being removed from the map, also remove termsOfUse and poweredBy divs
map | {OpenLayers.Map} |
getOLBoundsFromMapObjectBounds: function( moBounds )
moBounds | {Object} |
{OpenLayers.Bounds} An OpenLayers.Bounds, translated from the passed-in MapObject Bounds. Returns null if null value is passed in.
getMapObjectBoundsFromOLBounds: function( olBounds )
olBounds | {OpenLayers.Bounds} |
{Object} A MapObject Bounds, translated from olBounds Returns null if null value is passed in
Create a clone of this layer
clone: function()
Set the visibility flag for the layer and hide/show & redraw accordingly.
setVisibility: function( visible )
Hide or show the Layer
display: function( visible )
moveTo: function( bounds, zoomChanged, dragging )
Sets the opacity for the entire layer (all images)
setOpacity: function( opacity )
Clean up this layer.
destroy: function()
Remove all elements added to the dom.
removeGMapElements: function()
On being removed from the map, also remove termsOfUse and poweredBy divs
removeMap: function( map )
getOLBoundsFromMapObjectBounds: function( moBounds )
{String} String with information on why layer is broken, how to get it working.
getWarningHTML:function()
{Object} The mapObject’s current center in Map Object format
getMapObjectCenter: function()
{Integer} The mapObject’s current zoom, in Map Object format
getMapObjectZoom: function()
getLongitudeFromMapObjectLonLat: function( moLonLat )
getLatitudeFromMapObjectLonLat: function( moLonLat )
getXFromMapObjectPixel: function( moPixel )
getYFromMapObjectPixel: function( moPixel )
Load the GMap and register appropriate event listeners.
loadMapObject:function()
onMapResize: function()
Display the GMap container and associated elements.
setGMapVisibility: function( visible )
{DOMElement} the GMap container’s div
getMapContainer: function()
getMapObjectBoundsFromOLBounds: function( olBounds )
Set the mapObject to the specified center and zoom
setMapObjectCenter: function( center, zoom )
dragPanMapObject: function( dX, dY )
getMapObjectLonLatFromMapObjectPixel: function( moPixel )
getMapObjectPixelFromMapObjectLonLat: function( moLonLat )
getMapObjectZoomFromMapObjectBounds: function( moBounds )
getMapObjectLonLatFromLonLat: function( lon, lat )
getMapObjectPixelFromXY: function( x, y )