Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

78 lines (72 sloc) 3.484 kB
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<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">
debugging, error, fix, fixing, console, firebug, developers, advanced
</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:</p>
<pre> &lt;script src="../lib/Firebug/firebug.js"&gt;&lt;/script&gt;</pre>
<p>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>Command+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>
Jump to Line
Something went wrong with that request. Please try again.