Minor bus stop moving UI
[bus.git] / openlayers / examples / debug.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!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>    &lt;script src="../lib/Firebug/firebug.js"&gt;&lt;/script&gt;</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>