v3.js

Summary
v3.js
Constants
OpenLayers. Layer. Google.v3Mixin providing functionality specific to the Google Maps API v3.
DEFAULTS{Object} It is not recommended to change the properties set here.
Functions
loadMapObjectLoad the GMap and register appropriate event listeners.
repositionMapElementsWaits until powered by and terms of use elements are available and then moves them so they are clickable.
onMapResize
setGMapVisibilityDisplay the GMap container and associated elements.
getMapContainer{DOMElement} the GMap container’s div
getMapObjectBoundsFromOLBounds
getMapObjectLonLatFromMapObjectPixel
getMapObjectPixelFromMapObjectLonLat
setMapObjectCenterSet the mapObject to the specified center and zoom
getMapObjectZoomFromMapObjectBounds
getMapObjectLonLatFromLonLat
getMapObjectPixelFromXY
destroyClean up this layer.

Constants

OpenLayers. Layer. Google.v3

Mixin providing functionality specific to the Google Maps API v3.  Note that this layer configures the google.maps.map object with the “disableDefaultUI” option set to true.  Using UI controls that the Google Maps API provides is not supported by the OpenLayers API.

DEFAULTS

{Object} It is not recommended to change the properties set here.  Note that Google.v3 layers only work when sphericalMercator is set to true.

{
    maxExtent: new OpenLayers.Bounds(
        -128 * 156543.0339,
        -128 * 156543.0339,
        128 * 156543.0339,
        128 * 156543.0339
    ),
    sphericalMercator: true,
    maxResolution: 156543.0339,
    units: "m",
    projection: "EPSG:900913"
}

Functions

loadMapObject

loadMapObject:function()

Load the GMap and register appropriate event listeners.  If we can’t load GMap2, then display a warning message.

repositionMapElements

repositionMapElements: function()

Waits until powered by and terms of use elements are available and then moves them so they are clickable.

onMapResize

onMapResize: function()

setGMapVisibility

setGMapVisibility: function(visible)

Display the GMap container and associated elements.

Parameters

visible{Boolean} Display the GMap elements.

getMapContainer

getMapContainer: function()

Returns

{DOMElement} the GMap container’s div

getMapObjectBoundsFromOLBounds

getMapObjectBoundsFromOLBounds: function(olBounds)

Parameters

olBounds{OpenLayers.Bounds}

Returns

{Object} A MapObject Bounds, translated from olBounds Returns null if null value is passed in

getMapObjectLonLatFromMapObjectPixel

getMapObjectLonLatFromMapObjectPixel: function(moPixel)

Parameters

moPixel{Object} MapObject Pixel format

Returns

{Object} MapObject LonLat translated from MapObject Pixel

getMapObjectPixelFromMapObjectLonLat

getMapObjectPixelFromMapObjectLonLat: function(moLonLat)

Parameters

moLonLat{Object} MapObject LonLat format

Returns

{Object} MapObject Pixel transtlated from MapObject LonLat

setMapObjectCenter

setMapObjectCenter: function(center,
zoom)

Set the mapObject to the specified center and zoom

Parameters

center{Object} MapObject LonLat format
zoom{int} MapObject zoom format

getMapObjectZoomFromMapObjectBounds

getMapObjectZoomFromMapObjectBounds: function(moBounds)

Parameters

moBounds{Object} MapObject Bounds format

Returns

{Object} MapObject Zoom for specified MapObject Bounds

getMapObjectLonLatFromLonLat

getMapObjectLonLatFromLonLat: function(lon,
lat)

Parameters

lon{Float}
lat{Float}

Returns

{Object} MapObject LonLat built from lon and lat params

getMapObjectPixelFromXY

getMapObjectPixelFromXY: function(x,
y)

Parameters

x{Integer}
y{Integer}

Returns

{Object} MapObject Pixel from x and y parameters

destroy

destroy: function()

Clean up this layer.

loadMapObject:function()
Load the GMap and register appropriate event listeners.
repositionMapElements: function()
Waits until powered by and terms of use elements are available and then moves them so they are clickable.
onMapResize: function()
setGMapVisibility: function(visible)
Display the GMap container and associated elements.
getMapContainer: function()
{DOMElement} the GMap container’s div
getMapObjectBoundsFromOLBounds: function(olBounds)
getMapObjectLonLatFromMapObjectPixel: function(moPixel)
getMapObjectPixelFromMapObjectLonLat: function(moLonLat)
setMapObjectCenter: function(center,
zoom)
Set the mapObject to the specified center and zoom
getMapObjectZoomFromMapObjectBounds: function(moBounds)
getMapObjectLonLatFromLonLat: function(lon,
lat)
getMapObjectPixelFromXY: function(x,
y)
destroy: function()
Clean up this layer.
Instances of this class represent bounding boxes.
Close