Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

78 lines (72 sloc) 3.484 kB
<!DOCTYPE html>
<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() {
function consoleDirxml() {
<h1 id="title">Debug Example</h1>
<div id="tags">
debugging, error, fix, fixing, console, firebug, developers, advanced
<p id="shortdesc">
Demonstrate console calls to a Firebug console. Requires Firefox. Mostly for developers.
<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>
<a href="javascript: void(consoleLog());">OpenLayers.Console.log()</a>
<a href="javascript: void(consoleWarn());">OpenLayers.Console.warn()</a>
<a href="javascript: void(consoleError());">OpenLayers.Console.error()</a>
<a href="javascript: void(consoleDir());">OpenLayers.Console.dir()</a>
<a href="javascript: void(consoleDirxml());">OpenLayers.Console.dirxml()</a>
<p>The Firebug website has a complete list of
<a href="">console calls</a>.
Note that not all are supported with Firebug Lite.</p>
Jump to Line
Something went wrong with that request. Please try again.