OpenLayers JavaScript Mapping Library |
OpenLayers.MapInstances of OpenLayers.Map are interactive maps embedded in a web page. Create a new map with the OpenLayers.Map constructor. Summary
size{OpenLayers.Size} Size of the main div (this.div) layerContainerOrigin{OpenLayers.LonLat} The lonlat at which the later container was re-initialized (on-zoom) layers{Array(OpenLayers.Layer)} Ordered list of layers in the map center{OpenLayers.LonLat} The current center of the map viewRequestID{String} Used to store a unique identifier that changes when the map view changes. viewRequestID should be used when adding data asynchronously to the map: viewRequestID is incremented when you initiate your request (right now during changing of baselayers and changing of zooms). It is stored here in the map and also in the data that will be coming back asynchronously. Before displaying this data on request completion, we check that the viewRequestID of the data is still the same as that of the map. Fix for #480 tileSize{OpenLayers.Size} Set in the map options to override the default tile size for this map. maxExtent{OpenLayers.Bounds} The maximum extent for the map. Defaults to the whole world in decimal degrees (-180, -90, 180, 90). Specify a different extent in the map options if you are not using a geographic projection and displaying the whole world. OpenLayers.MapConstructor for a new OpenLayers.Map instance. Parameters
Examples// create a map with default options in an element with the id "map1" ReturnA new OpenLayers.Map instance getLayer
Get a layer based on its id Parameter
Return{OpenLayers.Layer} The Layer with the corresponding id from the map’s layer collection, or null if not found. |
Destroy this map
destroy:function()
Change the map options
setOptions: function( options )
Get the tile size for the map
getTileSize: function()
Get a layer based on its id
getLayer: function( id )