Make XHTML compliant.
[obnox/wireshark/wip.git] / ipmap.html
1 <?xml version="1.0" encoding="UTF-8"?>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3   <head>
4     <title>Wireshark: IP Location Map</title>
5     <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
6     <script type="text/javascript" src="http://openstreetmap.org/openlayers/OpenStreetMap.js"></script>
7
8     <script type="text/javascript">
9         <!--
10         var map;
11
12         function init() {
13             var map = new OpenLayers.Map("map", {
14                 controls: [
15                     new OpenLayers.Control.PanZoomBar(),
16                     new OpenLayers.Control.ScaleLine(),
17                     new OpenLayers.Control.MousePosition(),
18                     new OpenLayers.Control.MouseDefaults(),
19                     new OpenLayers.Control.Attribution()],
20                 projection: new OpenLayers.Projection("EPSG:900913"),
21                 displayProjection: new OpenLayers.Projection("EPSG:4326"),
22                 maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34, 20037508.34, 20037508.34),
23                 numZoomLevels: 18,
24                 maxResolution: 156543,
25                 units: "m"}
26             );
27
28             map.addLayer(new OpenLayers.Layer.OSM.Mapnik("Mapnik"));
29             map.addLayer(new OpenLayers.Layer.Text("IP Locations", {
30                 location: "ipmap.txt", projection: new OpenLayers.Projection("EPSG:4326")} ) );
31
32             var lonlat = (new OpenLayers.LonLat(0.0, 0.0));
33             lonlat.transform(map.displayProjection, map.projection);
34             map.setCenter(lonlat, 2);
35         }
36         // -->
37     </script>
38   </head>
39   <body onload="init()">
40     <div id="map"></div>
41   </body>
42 </html>