git-svn-id: http://svn.openlayers.org/trunk/openlayers@7095 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
74 lines
3.2 KiB
HTML
74 lines
3.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>OpenLayers Debug Example</title>
|
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
|
<script src="../lib/Firebug/firebug.js"></script>
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript">
|
|
function consoleLog() {
|
|
OpenLayers.Console.log("This is the result of an OpenLayers.Console.log() call");
|
|
}
|
|
function consoleWarn() {
|
|
OpenLayers.Console.warn("This is the result of an OpenLayers.Console.warn() call");
|
|
}
|
|
function consoleError() {
|
|
OpenLayers.Console.error("This is the result of an OpenLayers.Console.error() call");
|
|
}
|
|
function consoleDir() {
|
|
OpenLayers.Console.dir(OpenLayers);
|
|
}
|
|
function consoleDirxml() {
|
|
OpenLayers.Console.dirxml(document.getElementsByTagName('body')[0]);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1 id="title">Debug Example</h1>
|
|
|
|
<div id="tags"></div>
|
|
|
|
<p id="shortdesc">
|
|
Demonstrate console calls to a Firebug console. Requires Firefox. Mostly for developers.
|
|
</p>
|
|
|
|
<div id="docs">
|
|
<p>To run OpenLayers in debug mode, include the following script
|
|
tag <b>before</b> the tag that loads OpenLayers:
|
|
|
|
<pre> <script src="../lib/Firebug/firebug.js"></script></pre>
|
|
|
|
The path to firebug.js must be relative to your
|
|
html file. With this script included calls to OpenLayers.Console
|
|
will be displayed in the Firebug console. For browsers without
|
|
the Firebug extension, the script creates a Firebug Lite console.
|
|
This console can be opened by hitting <b>F12</b> or <b>Ctrl+Shift+L</b>
|
|
(<b>?+Shift+L</b> on a Mac). If you want the Firebug Lite console
|
|
to be open when the page loads, add <b>debug="true"</b> to the opening
|
|
html tag of your page. Open the console and click on the links below
|
|
to see console calls.</p>
|
|
<ul>
|
|
<li>
|
|
<a href="javascript: void(consoleLog());">OpenLayers.Console.log()</a>
|
|
</li>
|
|
<li>
|
|
<a href="javascript: void(consoleWarn());">OpenLayers.Console.warn()</a>
|
|
</li>
|
|
<li>
|
|
<a href="javascript: void(consoleError());">OpenLayers.Console.error()</a>
|
|
</li>
|
|
<li>
|
|
<a href="javascript: void(consoleDir());">OpenLayers.Console.dir()</a>
|
|
</li>
|
|
<li>
|
|
<a href="javascript: void(consoleDirxml());">OpenLayers.Console.dirxml()</a>
|
|
</li>
|
|
</ul>
|
|
<p>The Firebug website has a complete list of
|
|
<a href="http://www.getfirebug.com/console.html">console calls</a>.
|
|
Note that not all are supported with Firebug Lite.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|