Files
openlayers/files/OpenLayers/Layer/WMS-js.html
2007-06-21 00:29:02 +00:00

45 lines
15 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>OpenLayers.Layer.WMS - OpenLayers</title><link rel="stylesheet" type="text/css" href="../../../styles/main.css"><script language=JavaScript src="../../../javascript/main.js"></script></head><body class=UnframedPage 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 1.35 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td class=MenuSection valign=top><!--START_ND_MENU--><div class=MTitle>OpenLayers<div class=MSubTitle>JavaScript Mapping Library</div></div><div class=MEntry><div class=MFile><a href="../../OpenLayers-js.html">OpenLayers</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">OpenLayers</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../BaseTypes-js.html">Base Types</a></div></div><div class=MEntry><div class=MFile><a href="../Console-js.html">Console</a></div></div><div class=MEntry><div class=MFile><a href="../Control-js.html">Control.js</a></div></div><div class=MEntry><div class=MFile><a href="../Format-js.html">Format</a></div></div><div class=MEntry><div class=MFile><a href="../Geometry-js.html">Geometry</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Geometry</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../Geometry/Collection-js.html">Collection</a></div></div><div class=MEntry><div class=MFile><a href="../Geometry/MultiLineString-js.html">MultiLineString</a></div></div><div class=MEntry><div class=MFile><a href="../Geometry/MultiPoint-js.html">MultiPoint</a></div></div><div class=MEntry><div class=MFile><a href="../Geometry/Point-js.html">Point</a></div></div><div class=MEntry><div class=MFile><a href="../Geometry/Polygon-js.html">Polygon</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../Layer-js.html">Layer</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Layer</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="Image-js.html">Image</a></div></div><div class=MEntry><div class=MFile><a href="Vector-js.html">Vector</a></div></div><div class=MEntry><div class=MFile id=MSelected>WMS</div></div></div></div></div><div class=MEntry><div class=MFile><a href="../Map-js.html">Map</a></div></div><div class=MEntry><div class=MFile><a href="../Marker-js.html">Marker</a></div></div><div class=MEntry><div class=MFile><a href="../Tile-js.html">Tile</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Tile</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../Tile/Image-js.html">Image</a></div></div><div class=MEntry><div class=MFile><a href="../Tile/WFS-js.html">WFS</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Index</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MIndex><a href="../../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Properties.html">Properties</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Files.html">Files</a></div></div></div></div></div><script language=JavaScript><!--
if (document.getElementById){for (var menu = 1; menu < 6; menu++){if (menu != 2 && menu != 4 && menu != 3 && menu != 1){document.getElementById("MGroupContent" + menu).style.display = "none";};};}// --></script><!--END_ND_MENU--></td>
<td class=ContentSection valign=top><div class=CClass id=MainTopic><div class=CTopic><h1 class=CTitle><a name="OpenLayers.Layer.WMS"></a>OpenLayers.<span class=HB> </span>Layer.WMS</h1><div class=CBody><p class=CParagraph>Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services.&nbsp; Create a new WMS layer with the <a href="#OpenLayers.Layer.WMS.OpenLayers.Layer.WMS" class=LFunction id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">OpenLayers.Layer.WMS</a> constructor.</p><h4 class=CHeading>Inherits from</h4><ul class=CBulletList><li>&lt;OpenLayers.Layer.Grid&gt;</li></ul><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr><td class=SEntrySize><div class=SMain><div class=SEntry><a href="#OpenLayers.Layer.WMS" >OpenLayers.<span class=HB> </span>Layer.WMS</a></div></div></td><td class=SDescriptionSize><div class=SMain><div class=SDescription>Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services. </div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Layer.WMS.Constants" >Constants</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SConstant><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.DEFAULT_PARAMS" >DEFAULT_PARAMS</a></div></div></div></td><td><div class=SConstant><div class=SDescription><div class=SIndent2>{Object} Hashtable of default parameter key/value pairs</div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Layer.WMS.Properties" >Properties</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.reproject" >reproject</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{Boolean} Try to reproject this layer if its coordinate reference system is different than that of the base layer. </div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Layer.WMS.Functions" >Functions</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.OpenLayers.Layer.WMS" >OpenLayers.<span class=HB> </span>Layer.WMS</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Create a new WMS layer object</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.destroy" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">destroy</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Destroy this layer</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.clone" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">clone</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Create a clone of this layer</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.getURL" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">getURL</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Return a GetMap query string for this layer</div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Layer.WMS.Constants" >Constants</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SConstant><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Layer.WMS.CLASS_NAME" >CLASS_NAME</a></div></div></div></td><td><div class=SConstant><div class=SDescription><div class=SIndent2>{String} OpenLayers.Layer.WMS</div></div></div></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.Constants"></a>Constants</h3></div></div>
<div class=CConstant><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.DEFAULT_PARAMS"></a>DEFAULT_PARAMS</h3><div class=CBody><p class=CParagraph>{Object} Hashtable of default parameter key/value pairs</p></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.Properties"></a>Properties</h3></div></div>
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.reproject"></a>reproject</h3><div class=CBody><p class=CParagraph>{Boolean} Try to reproject this layer if its coordinate reference system is different than that of the base layer.&nbsp; Default is true.&nbsp; Set this in the layer options.&nbsp; Should be set to false in most cases.</p></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.Functions"></a>Functions</h3></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.OpenLayers.Layer.WMS"></a>OpenLayers.<span class=HB> </span>Layer.WMS</h3><div class=CBody><p class=CParagraph>Create a new WMS layer object</p><h4 class=CHeading>Example</h4><blockquote><pre class=CCode>var wms = new OpenLayers.Layer.WMS(&quot;NASA Global Mosaic&quot;,<br> &quot;http://wms.jpl.nasa.gov/wms.cgi&quot;,<br> {layers: &quot;modis,global_mosaic&quot;});</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>name</td><td class=CDLDescription>{String} A name for the layer</td></tr><tr><td class=CDLEntry>url</td><td class=CDLDescription>{String} Base url for the WMS (e.g.&nbsp; <a href="http://wms.jpl.nasa.gov/wms.cgi" class=LURL>http://wms.jpl.nasa.gov/wms.cgi</a>)</td></tr><tr><td class=CDLEntry>params</td><td class=CDLDescription>{Object} An object with key/value pairs representing the GetMap query string parameters and parameter values.</td></tr><tr><td class=CDLEntry>options</td><td class=CDLDescription>{Ojbect} Hashtable of extra options to tag onto the layer</td></tr></table><h4 class=CHeading>Return</h4><p class=CParagraph>A new OpenLayers.Layer.WMS instance</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.destroy"></a>destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>destroy: function()</td></tr></table></blockquote><p class=CParagraph>Destroy this layer</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.clone"></a>clone</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>clone: function (</td><td class=PParameter nowrap>obj</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Create a clone of this layer</p><h4 class=CHeading>Return</h4><p class=CParagraph>{<a href="#OpenLayers.Layer.WMS.OpenLayers.Layer.WMS" class=LFunction id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">OpenLayers.Layer.WMS</a>} An exact clone of this layer</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.getURL"></a>getURL</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getURL: function (</td><td class=PParameter nowrap>bounds</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Return a GetMap query string for this layer</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>bounds</td><td class=CDLDescription>{<a href="../BaseTypes-js.html#OpenLayers.Bounds" class=LClass id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">OpenLayers.Bounds</a>} A bounds representing the bbox for the request</td></tr></table><h4 class=CHeading>Return</h4><p class=CParagraph>{String} A string with the layer&rsquo;s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters</p></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.Constants"></a>Constants</h3></div></div>
<div class=CConstant><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Layer.WMS.CLASS_NAME"></a>CLASS_NAME</h3><div class=CBody><p class=CParagraph>{String} OpenLayers.Layer.WMS</p></div></div></div>
</td>
</tr></table><div class=Footer><!--START_ND_FOOTER-->Generated by <a href="http://www.naturaldocs.org">Natural Docs</a><!--END_ND_FOOTER--></div>
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>destroy: function()</td></tr></table></blockquote>Destroy this layer</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>clone: function (</td><td class=PParameter nowrap>obj</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a clone of this layer</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getURL: function (</td><td class=PParameter nowrap>bounds</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Return a GetMap query string for this layer</div></div><div class=CToolTip id="tt4"><div class=CFunction>Create a new WMS layer object</div></div><div class=CToolTip id="tt5"><div class=CClass>Instances of this class represent bounding boxes. </div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>