OpenLayers JavaScript Mapping Library |
OpenLayers. Layer. EventPaneBase class for 3rd party layers. Create a new event pane layer with the OpenLayers.Layer.EventPane constructor. Inherits fromSummary
setMap
Set the map property for the layer. This is done through an accessor so that subclasses can override this and take special action once they have their map variable set. Parameters
removeMap
On being removed from the map, we’ll like to remove the invisible ‘pane’ div that we added to it on creation. Parameters
loadWarningMessage
If we can’t load the map lib, then display an error message to the user and tell them where to go for help. This function sets up the layout for the warning message. Each 3rd party layer must implement its own getWarningHTML() function to provide the actual warning message. moveTo
Handle calls to move the layer. Parameters
getLonLatFromViewPortPx
Get a map location from a pixel location Parameters
Returns{OpenLayers.LonLat} An OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by map lib If the map lib is not loaded or not centered, returns null getViewPortPxFromLonLat
Get a pixel location from a map location Parameters
Returns{OpenLayers.Pixel} An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels by map lib If map lib is not loaded or not centered, returns null getOLLonLatFromMapObjectLonLat
Get an OL style map location from a 3rd party style map location Parameters moLonLat - {Object} Returns{OpenLayers.LonLat} An OpenLayers.LonLat, translated from the passed in MapObject LonLat Returns null if null value is passed in getMapObjectLonLatFromOLLonLat
Get a 3rd party map location from an OL map location. Parameters
Returns{Object} A MapObject LonLat, translated from the passed in OpenLayers.LonLat Returns null if null value is passed in getOLPixelFromMapObjectPixel
Get an OL pixel location from a 3rd party pixel location. Parameters
Returns{OpenLayers.Pixel} An OpenLayers.Pixel, translated from the passed in MapObject Pixel Returns null if null value is passed in getMapObjectPixelFromOLPixel
Get a 3rd party pixel location from an OL pixel location Parameters
Returns{Object} A MapObject Pixel, translated from the passed in OpenLayers.Pixel Returns null if null value is passed in |
Deconstruct this layer.
destroy: function()
Set the map property for the layer.
setMap: function( map )
On being removed from the map, we’ll like to remove the invisible ‘pane’ div that we added to it on creation.
removeMap: function( map )
If we can’t load the map lib, then display an error message to the user and tell them where to go for help.
loadWarningMessage:function()
To be implemented by subclasses.
getWarningHTML:function()
Set the display on the pane
display: function( display )
Set the z-index order for the pane.
setZIndex: function ( zIndex )
Handle calls to move the layer.
moveTo:function( bounds, zoomChanged, dragging )
Get a map location from a pixel location
getLonLatFromViewPortPx: function ( viewPortPx )
Get a pixel location from a map location
getViewPortPxFromLonLat: function ( lonlat )
Get an OL style map location from a 3rd party style map location
getOLLonLatFromMapObjectLonLat: function( moLonLat )
Get a 3rd party map location from an OL map location.
getMapObjectLonLatFromOLLonLat: function( olLonLat )
Get an OL pixel location from a 3rd party pixel location.
getOLPixelFromMapObjectPixel: function( moPixel )
Get a 3rd party pixel location from an OL pixel location
getMapObjectPixelFromOLPixel: function( olPixel )