]> dev.renevier.net Git - syp.git/blob - openlayers/examples/debug.html
initial commit
[syp.git] / openlayers / examples / debug.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4     <head>
5         <title>OpenLayers Debug Example</title>
6         <link rel="stylesheet" href="style.css" type="text/css" />        
7         <script src="../lib/Firebug/firebug.js"></script>
8         <script src="../lib/OpenLayers.js"></script>
9         <script type="text/javascript">
10             function consoleLog() {
11                 OpenLayers.Console.log("This is the result of an OpenLayers.Console.log() call");
12             }
13             function consoleWarn() {
14                 OpenLayers.Console.warn("This is the result of an OpenLayers.Console.warn() call");
15             }
16             function consoleError() {
17                 OpenLayers.Console.error("This is the result of an OpenLayers.Console.error() call");
18             }
19             function consoleDir() {
20                 OpenLayers.Console.dir(OpenLayers);
21             }
22             function consoleDirxml() {
23                 OpenLayers.Console.dirxml(document.getElementsByTagName('body')[0]);
24             }
25         </script>
26     </head>
27     <body>
28         <h1 id="title">Debug Example</h1>
29
30         <div id="tags"></div>
31
32         <p id="shortdesc">
33             Demonstrate console calls to a Firebug console. Requires Firefox. Mostly for developers.
34         </p>
35
36         <div id="docs">
37             <p>To run OpenLayers in debug mode, include the following script
38             tag <b>before</b> the tag that loads OpenLayers:
39
40             <pre>    &lt;script src="../lib/Firebug/firebug.js"&gt;&lt;/script&gt;</pre>
41
42             The path to firebug.js must be relative to your
43             html file.  With this script included calls to OpenLayers.Console
44             will be displayed in the Firebug console.  For browsers without
45             the Firebug extension, the script creates a Firebug Lite console.
46             This console can be opened by hitting <b>F12</b> or <b>Ctrl+Shift+L</b>
47             (<b>?+Shift+L</b> on a Mac).  If you want the Firebug Lite console
48             to be open when the page loads, add <b>debug="true"</b> to the opening
49             html tag of your page.  Open the console and click on the links below
50             to see console calls.</p>
51             <ul>
52                 <li>
53                     <a href="javascript: void(consoleLog());">OpenLayers.Console.log()</a>
54                 </li>
55                 <li>
56                     <a href="javascript: void(consoleWarn());">OpenLayers.Console.warn()</a>
57                 </li>
58                 <li>
59                     <a href="javascript: void(consoleError());">OpenLayers.Console.error()</a>
60                 </li>
61                 <li>
62                     <a href="javascript: void(consoleDir());">OpenLayers.Console.dir()</a>
63                 </li>
64                 <li>
65                     <a href="javascript: void(consoleDirxml());">OpenLayers.Console.dirxml()</a>
66                 </li>
67             </ul>
68             <p>The Firebug website has a complete list of
69             <a href="http://www.getfirebug.com/console.html">console calls</a>.
70             Note that not all are supported with Firebug Lite.</p>
71         </div>
72     </body>
73 </html>