<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>OpenLayers.Map - OpenLayers</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version Development Release 12-07-2007 (1.35 base) -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="OpenLayers.Map"></a>OpenLayers.Map</h1><div class=CBody><p>Instances of OpenLayers.Map are interactive maps embedded in a web page. Create a new map with the <a href="#OpenLayers.Map.OpenLayers.Map" class=LConstructor id=link64 onMouseOver="ShowTip(event, 'tt59', 'link64')" onMouseOut="HideTip('tt59')">OpenLayers.Map</a> constructor.</p><p>On their own maps do not provide much functionality. To extend a map it’s necessary to add controls (<a href="Control-js.html#OpenLayers.Control" class=LClass id=link65 onMouseOver="ShowTip(event, 'tt60', 'link65')" onMouseOut="HideTip('tt60')">OpenLayers.Control</a>) and layers (<a href="Layer-js.html#OpenLayers.Layer" class=LClass >OpenLayers.Layer</a>) to the map.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#OpenLayers.Map" >OpenLayers.Map</a></td><td class=SDescription>Instances of OpenLayers.Map are interactive maps embedded in a web page. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#OpenLayers.Map.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.Z_INDEX_BASE" >Z_INDEX_BASE</a></td><td class=SDescription>{Object} Base z-indexes for different classes of thing</td></tr><tr class="SConstant SIndent2"><td class=SEntry><a href="#OpenLayers.Map.EVENT_TYPES" >EVENT_TYPES</a></td><td class=SDescription>{Array(String)} Supported application event types. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#OpenLayers.Map.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.events" >events</a></td><td class=SDescription>{<a href="Events-js.html#OpenLayers.Events" class=LClass >OpenLayers.Events</a>} An events object that handles all events on the map</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.div" >div</a></td><td class=SDescription>{DOMElement} The element that contains the map</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.layers" >layers</a></td><td class=SDescription>{Array(<a href="Layer-js.html#OpenLayers.Layer" class=LClass >OpenLayers.Layer</a>)} Ordered list of layers in the map</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.baseLayer" >baseLayer</a></td><td class=SDescription>{<a href="Layer-js.html#OpenLayers.Layer" class=LClass >OpenLayers.Layer</a>} The currently selected base layer. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.tileSize" >tileSize</a></td><td class=SDescription>{<a href="BaseTypes/Size-js.html#OpenLayers.Size" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">OpenLayers.Size</a>} Set in the map options to override the default tile size for this map.</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.projection" >projection</a></td><td class=SDescription>{String} Set in the map options to override the default projection string this map - also set maxExtent, maxResolution, and units if appropriate.</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.units" >units</a></td><td class=SDescription>{String} The map units. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.resolutions" >resolutions</a></td><td class=SDescription>{Array(Float)} A list of map resolutions (map units per pixel) in descending order. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.maxResolution" >maxResolution</a></td><td class=SDescription>{Float} Default max is 360 deg / 256 px, which corresponds to zoom level 0 on gmaps. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.minResolution" >minResolution</a></td><td class=SDescription>{Float}</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.maxScale" >maxScale</a></td><td class=SDescription>{Float}</td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.minScale" >minScale</a></td><td class=SDescription>{Float}</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.maxExtent" >maxExtent</a></td><td class=SDescription>{<a href="BaseTypes/Bounds-js.html#OpenLayers.Bounds" class=LClass id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">OpenLayers.Bounds</a>} The maximum extent for the map. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.minExtent" >minExtent</a></td><td class=SDescription>{<a href="BaseTypes/Bounds-js.html#OpenLayers.Bounds" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')">OpenLayers.Bounds</a>}</td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.restrictedExtent" >restrictedExtent</a></td><td class=SDescription>{<a href="BaseTypes/Bounds-js.html#OpenLayers.Bounds" class=LClass id=link4 onMouseOver="ShowTip(event, 'tt2', 'link4')" onMouseOut="HideTip('tt2')">OpenLayers.Bounds</a>} Limit map navigation to this extent where possible. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.numZoomLevels" >numZoomLevels</a></td><td class=SDescription>{Integer} Number of zoom levels for the map. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.theme" >theme</a></td><td class=SDescription>{String} Relative path to a CSS file from which to load theme styles. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.displayProjection" >displayProjection</a></td><td class=SDescription>{<a href="Projection-js.html#OpenLayers.Projection" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt3', 'link5')" onMouseOut="HideTip('tt3')">OpenLayers.Projection</a>} Requires proj4js support.Projection used by several controls to display data to user. </td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.fallThrough" >fallThrough</a></td><td class=SDescription>{Boolean} Should OpenLayers allow events on the map to fall through to other elements on the page, or should it swallow them? </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#OpenLayers.Map.eventListeners" >eventListeners</a></td><td class=SDescription>{Object} If set as an option at construction, the eventListeners object will be registered with <OpenLayers.Events.on>. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#OpenLayers.Map.Constructor" >Constructor</a></td><td class=SDescription></td></tr><tr class="SConstructor SIndent2 SMarked"><td class=SEntry><a href="#OpenLayers.Map.OpenLayers.Map" >OpenLayers.Map</a></td><td class=SDescription>Constructor for a new OpenLayers.Ma
- 1
- 2
前往页