git-svn-id: http://svn.openlayers.org/sandbox/tschaub/naturaldocs/doc@3385 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
52 lines
20 KiB
HTML
52 lines
20 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
|
|
<html><head><title>OpenLayers.Tile - 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('MGroupContent3')">OpenLayers</a><div class=MGroupContent id=MGroupContent3><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="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=MFile><a href="Geometry/Collection-js.html">Geometry.<span class=HB> </span>Collection</a></div></div><div class=MEntry><div class=MFile><a href="Geometry/MultiLineString-js.html">Geometry.<span class=HB> </span>MultiLineString</a></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('MGroupContent1')">Layer</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="Layer/Image-js.html">Image</a></div></div><div class=MEntry><div class=MFile><a href="Layer/Vector-js.html">Vector</a></div></div><div class=MEntry><div class=MFile><a href="Layer/WMS-js.html">WMS</a></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 id=MSelected>Tile</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Tile</a><div class=MGroupContent id=MGroupContent2><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('MGroupContent4')">Index</a><div class=MGroupContent id=MGroupContent4><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></div></div><!--END_ND_MENU--></td>
|
|
|
|
<td class=ContentSection valign=top><div class=CClass id=MainTopic><div class=CTopic><h1 class=CTitle><a name="OpenLayers.Tile"></a>OpenLayers.Tile</h1><div class=CBody><p class=CParagraph>This is a class designed to designate a single tile, however it is explicitly designed to do relatively little. Tiles store information about themselves -- such as the URL that they are related to, and their size - but do not add themselves to the layer div automatically, for example. Create a new tile with the <a href="#OpenLayers.Tile.OpenLayers.Tile" class=LFunction id=link9 onMouseOver="ShowTip(event, 'tt3', 'link9')" onMouseOut="HideTip('tt3')">OpenLayers.Tile</a> constructor, or a subclass.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>TBD 3.0</td><td class=CDLDescription>remove reference to url in above paragraph</td></tr></table><!--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.Tile" >OpenLayers.Tile</a></div></div></td><td class=SDescriptionSize><div class=SMain><div class=SDescription>This is a class designed to designate a single tile, however it is explicitly designed to do relatively little. </div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Tile.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.Tile.id" >id</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{String} null</div></div></div></td></tr><tr><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.layer" >layer</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{<a href="Layer-js.html#OpenLayers.Layer" class=LClass >OpenLayers.Layer</a>} layer the tile is attached to</div></div></div></td></tr><tr class=SMarked><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.url" >url</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{String} url of the request</div></div></div></td></tr><tr><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.bounds" >bounds</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{<a href="BaseTypes-js.html#OpenLayers.Bounds" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">OpenLayers.Bounds</a>} null</div></div></div></td></tr><tr class=SMarked><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.size" >size</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{<a href="BaseTypes-js.html#OpenLayers.Size" class=LClass id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">OpenLayers.Size</a>} null</div></div></div></td></tr><tr><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.position" >position</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{OpenLayers.Pixel} Top Left pixel of the tile</div></div></div></td></tr><tr class=SMarked><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.drawn" >drawn</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{Boolean} false</div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Tile.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.Tile.OpenLayers.Tile" >OpenLayers.Tile</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Constructor for a new <a href="#OpenLayers.Tile.OpenLayers.Tile" class=LFunction id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">OpenLayers.Tile</a> instance.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.destroy" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">destroy</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>nullify references to prevent circular references and memory leaks</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.draw" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">draw</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Clear out existing tile, and return whether to draw or not. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.moveTo" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">moveTo</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Reposition the tile.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.clear" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">clear</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Clear the tile of any bounds/position-related data so that it can be reused in a new location.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Tile.getBoundsFromBaseLayer" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">getBoundsFromBaseLayer</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.</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.Tile.Properties"></a>Properties</h3></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.id"></a>id</h3><div class=CBody><p class=CParagraph>{String} null</p></div></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.layer"></a>layer</h3><div class=CBody><p class=CParagraph>{<a href="Layer-js.html#OpenLayers.Layer" class=LClass >OpenLayers.Layer</a>} layer the tile is attached to</p></div></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.url"></a>url</h3><div class=CBody><p class=CParagraph>{String} url of the request</p><p class=CParagraph>TBD 3.0 Deprecated. The base tile class does not need an url. This should be handled in subclasses. Does not belong here.</p></div></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.bounds"></a>bounds</h3><div class=CBody><p class=CParagraph>{<a href="BaseTypes-js.html#OpenLayers.Bounds" class=LClass id=link10 onMouseOver="ShowTip(event, 'tt1', 'link10')" onMouseOut="HideTip('tt1')">OpenLayers.Bounds</a>} null</p></div></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.size"></a>size</h3><div class=CBody><p class=CParagraph>{<a href="BaseTypes-js.html#OpenLayers.Size" class=LClass id=link11 onMouseOver="ShowTip(event, 'tt2', 'link11')" onMouseOut="HideTip('tt2')">OpenLayers.Size</a>} null</p></div></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.position"></a>position</h3><div class=CBody><p class=CParagraph>{OpenLayers.Pixel} Top Left pixel of the tile</p></div></div></div>
|
|
|
|
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.drawn"></a>drawn</h3><div class=CBody><p class=CParagraph>{Boolean} false</p></div></div></div>
|
|
|
|
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.Functions"></a>Functions</h3></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.OpenLayers.Tile"></a>OpenLayers.Tile</h3><div class=CBody><p class=CParagraph>Constructor for a new <a href="#OpenLayers.Tile.OpenLayers.Tile" class=LFunction id=link12 onMouseOver="ShowTip(event, 'tt3', 'link12')" onMouseOut="HideTip('tt3')">OpenLayers.Tile</a> instance.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>layer</td><td class=CDLDescription>{<a href="Layer-js.html#OpenLayers.Layer" class=LClass >OpenLayers.Layer</a>} layer that the tile will go in.</td></tr><tr><td class=CDLEntry>position</td><td class=CDLDescription>{<a href="BaseTypes-js.html#OpenLayers.Pixel" class=LClass id=link13 onMouseOver="ShowTip(event, 'tt9', 'link13')" onMouseOut="HideTip('tt9')">OpenLayers.Pixel</a>}</td></tr><tr><td class=CDLEntry>bounds</td><td class=CDLDescription>{<a href="BaseTypes-js.html#OpenLayers.Bounds" class=LClass id=link14 onMouseOver="ShowTip(event, 'tt1', 'link14')" onMouseOut="HideTip('tt1')">OpenLayers.Bounds</a>}</td></tr><tr><td class=CDLEntry>url</td><td class=CDLDescription>{<String>}</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>{<a href="BaseTypes-js.html#OpenLayers.Size" class=LClass id=link15 onMouseOver="ShowTip(event, 'tt2', 'link15')" onMouseOut="HideTip('tt2')">OpenLayers.Size</a>}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.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>nullify references to prevent circular references and memory leaks</p></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.draw"></a>draw</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>draw:function()</td></tr></table></blockquote><p class=CParagraph>Clear out existing tile, and return whether to draw or not. Should be called as first line of all subclasses.</p><h4 class=CHeading>Return</h4><p class=CParagraph>{Boolean} Whether the tile should be drawn or not. If the tile is outside the maxextent, for example, will return false.</p></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.moveTo"></a>moveTo</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>moveTo: function (</td><td class=PParameter nowrap>bounds,</td></tr><tr><td></td><td class=PParameter nowrap>position,</td></tr><tr><td></td><td class=PParameter nowrap>redraw</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Reposition the tile.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>bounds</td><td class=CDLDescription>{OpenLayers.Bounds}</td></tr><tr><td class=CDLEntry>position</td><td class=CDLDescription>{OpenLayers.pixel}</td></tr><tr><td class=CDLEntry>redraw</td><td class=CDLDescription>{Boolean} Call draw method on tile after moving? Default is true</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.clear"></a>clear</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>clear: function()</td></tr></table></blockquote><p class=CParagraph>Clear the tile of any bounds/position-related data so that it can be reused in a new location.</p></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Tile.getBoundsFromBaseLayer"></a>getBoundsFromBaseLayer</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>getBoundsFromBaseLayer: function(</td><td class=PParameter nowrap>position</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>position</td><td class=CDLDescription>{<a href="BaseTypes-js.html#OpenLayers.Pixel" class=LClass id=link16 onMouseOver="ShowTip(event, 'tt9', 'link16')" onMouseOut="HideTip('tt9')">OpenLayers.Pixel</a>}</td></tr></table><h4 class=CHeading>Return</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=link17 onMouseOver="ShowTip(event, 'tt1', 'link17')" onMouseOut="HideTip('tt1')">OpenLayers.Bounds</a>}</td></tr></table></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=CClass>Instances of this class represent bounding boxes. </div></div><div class=CToolTip id="tt2"><div class=CClass>Instances of this class represent a width/height pair</div></div><div class=CToolTip id="tt3"><div class=CFunction>Constructor for a new OpenLayers.Tile instance.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>destroy:function()</td></tr></table></blockquote>nullify references to prevent circular references and memory leaks</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>draw:function()</td></tr></table></blockquote>Clear out existing tile, and return whether to draw or not. </div></div><div class=CToolTip id="tt6"><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>moveTo: function (</td><td class=PParameter nowrap>bounds,</td></tr><tr><td></td><td class=PParameter nowrap>position,</td></tr><tr><td></td><td class=PParameter nowrap>redraw</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Reposition the tile.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>clear: function()</td></tr></table></blockquote>Clear the tile of any bounds/position-related data so that it can be reused in a new location.</div></div><div class=CToolTip id="tt8"><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>getBoundsFromBaseLayer: function(</td><td class=PParameter nowrap>position</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.</div></div><div class=CToolTip id="tt9"><div class=CClass>This class represents a screen coordinate, in x and y coordinates</div></div><!--END_ND_TOOLTIPS-->
|
|
|
|
<script language=JavaScript><!--
|
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |