git-svn-id: http://svn.openlayers.org/sandbox/tschaub/naturaldocs/doc@3381 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
52 lines
22 KiB
HTML
52 lines
22 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
|
|
<html><head><title>OpenLayers.Console - 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 id=MSelected>Console</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="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="Tile-js.html">Tile</a></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.Console"></a>OpenLayers.<span class=HB> </span>Console</h1><div class=CBody><p class=CParagraph>The OpenLayers.Console namespace is used for debugging and error logging. If the Firebug Lite (../Firebug/firebug.js) is included before this script, calls to OpenLayers.Console methods will get redirected to window.console. This makes use of the Firebug extension where available and allows for cross-browser debugging Firebug style.</p><h4 class=CHeading>Note</h4><p class=CParagraph>Note that behavior will differ with the Firebug extention and Firebug Lite. Most notably, the Firebug Lite console does not currently allow for hyperlinks to code or for clicking on object to explore their properties.</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><td class=SEntrySize><div class=SMain><div class=SEntry><a href="#OpenLayers.Console" >OpenLayers.<span class=HB> </span>Console</a></div></div></td><td class=SDescriptionSize><div class=SMain><div class=SDescription>The OpenLayers.Console namespace is used for debugging and error logging. </div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Console.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.Console.log" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">log</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Log an object in the console. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.debug" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">debug</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Writes a message to the console, including a hyperlink to the line where it was called.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.info" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">info</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Writes a message to the console with the visual “info” icon and color coding and a hyperlink to the line where it was called.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.warn" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">warn</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Writes a message to the console with the visual “warning” icon and color coding and a hyperlink to the line where it was called.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.error" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">error</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Writes a message to the console with the visual “error” icon and color coding and a hyperlink to the line where it was called.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.assert" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">assert</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Tests that an expression is true. </div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.dir" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">dir</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Prints an interactive listing of all properties of the object. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.dirxml" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">dirxml</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Prints the XML source tree of an HTML or XML element. </div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.trace" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">trace</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Prints an interactive stack trace of JavaScript execution at the point where it is called. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.group" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">group</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Writes a message to the console and opens a nested block to indent all future messages sent to the console. </div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.groupEnd" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">groupEnd</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Closes the most recently opened block created by a call to OpenLayers.Console.group</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Console.time" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">time</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Creates a new timer under the given name. </div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Console.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.Console.CLASS_NAME" >CLASS_NAME</a></div></div></div></td><td><div class=SConstant><div class=SDescription><div class=SIndent2></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.Console.Functions"></a>Functions</h3></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.log"></a>log</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>log: function()</td></tr></table></blockquote><p class=CParagraph>Log an object in the console. The Firebug Lite console logs string representation of objects. Given multiple arguments, they will be cast to strings and logged with a space delimiter. If the first argument is a string with printf-like formatting, subsequent arguments will be used in string substitution. Any additional arguments (beyond the number substituted in a format string) will be appended in a space- delimited line.</p><h4 class=CHeading>Examples</h4><blockquote><pre class=CCode>// Firebug Lite logs someObject.toString()<br>OpenLayers.Console.log(someObject);<br><br>// string substitution<br>OpenLayers.Console.log("%s jumped over %s", cow, moon);</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.debug"></a>debug</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>debug: function()</td></tr></table></blockquote><p class=CParagraph>Writes a message to the console, including a hyperlink to the line where it was called.</p><p class=CParagraph>May be called with multiple arguments as with OpenLayers.Console.log().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.info"></a>info</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>info: function()</td></tr></table></blockquote><p class=CParagraph>Writes a message to the console with the visual “info” icon and color coding and a hyperlink to the line where it was called.</p><p class=CParagraph>May be called with multiple arguments as with OpenLayers.Console.log().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.warn"></a>warn</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>warn: function()</td></tr></table></blockquote><p class=CParagraph>Writes a message to the console with the visual “warning” icon and color coding and a hyperlink to the line where it was called.</p><p class=CParagraph>May be called with multiple arguments as with OpenLayers.Console.log().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.error"></a>error</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>error: function()</td></tr></table></blockquote><p class=CParagraph>Writes a message to the console with the visual “error” icon and color coding and a hyperlink to the line where it was called.</p><p class=CParagraph>May be called with multiple arguments as with OpenLayers.Console.log().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.assert"></a>assert</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>assert: function()</td></tr></table></blockquote><p class=CParagraph>Tests that an expression is true. If not, it will write a message to the console and throw an exception.</p><p class=CParagraph>May be called with multiple arguments as with OpenLayers.Console.log().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.dir"></a>dir</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>dir: function()</td></tr></table></blockquote><p class=CParagraph>Prints an interactive listing of all properties of the object. This looks identical to the view that you would see in the DOM tab.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.dirxml"></a>dirxml</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>dirxml: function()</td></tr></table></blockquote><p class=CParagraph>Prints the XML source tree of an HTML or XML element. This looks identical to the view that you would see in the HTML tab. You can click on any node to inspect it in the HTML tab.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.trace"></a>trace</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>trace: function()</td></tr></table></blockquote><p class=CParagraph>Prints an interactive stack trace of JavaScript execution at the point where it is called. The stack trace details the functions on the stack, as well as the values that were passed as arguments to each function. You can click each function to take you to its source in the Script tab, and click each argument value to inspect it in the DOM or HTML tabs.</p></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.group"></a>group</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>group: function()</td></tr></table></blockquote><p class=CParagraph>Writes a message to the console and opens a nested block to indent all future messages sent to the console. Call OpenLayers.Console.groupEnd() to close the block.</p><p class=CParagraph>May be called with multiple arguments as with OpenLayers.Console.log().</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>{Object}</td></tr></table></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.groupEnd"></a>groupEnd</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>groupEnd: function()</td></tr></table></blockquote><p class=CParagraph>Closes the most recently opened block created by a call to OpenLayers.Console.group</p></div></div></div>
|
|
|
|
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.time"></a>time</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>time: function()</td></tr></table></blockquote><p class=CParagraph>Creates a new timer under the given name. Call OpenLayers.Console.timeEnd(name) with the same name to stop the timer and print the time elapsed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>name</td><td class=CDLDescription>{String}</td></tr></table></div></div></div>
|
|
|
|
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.Constants"></a>Constants</h3></div></div>
|
|
|
|
<div class=CConstant><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Console.CLASS_NAME"></a>CLASS_NAME</h3></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>log: function()</td></tr></table></blockquote>Log an object in the console. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>debug: function()</td></tr></table></blockquote>Writes a message to the console, including a hyperlink to the line where it was called.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>info: function()</td></tr></table></blockquote>Writes a message to the console with the visual “info” icon and color coding and a hyperlink to the line where it was called.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>warn: function()</td></tr></table></blockquote>Writes a message to the console with the visual “warning” icon and color coding and a hyperlink to the line where it was called.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>error: function()</td></tr></table></blockquote>Writes a message to the console with the visual “error” icon and color coding and a hyperlink to the line where it was called.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>assert: function()</td></tr></table></blockquote>Tests that an expression is true. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>dir: function()</td></tr></table></blockquote>Prints an interactive listing of all properties of the object. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>dirxml: function()</td></tr></table></blockquote>Prints the XML source tree of an HTML or XML element. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>trace: function()</td></tr></table></blockquote>Prints an interactive stack trace of JavaScript execution at the point where it is called. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>group: function()</td></tr></table></blockquote>Writes a message to the console and opens a nested block to indent all future messages sent to the console. </div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>groupEnd: function()</td></tr></table></blockquote>Closes the most recently opened block created by a call to OpenLayers.Console.group</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>time: function()</td></tr></table></blockquote>Creates a new timer under the given name. </div></div><!--END_ND_TOOLTIPS-->
|
|
|
|
<script language=JavaScript><!--
|
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |