Add #ifndef __PRIVILEGES_H__ / #define / #endif logic to prevent multiple
[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_file = "ipmap.txt";
30             if (document.location.hash.length > 1) {
31               map_file = document.location.hash.substr(1);
32             }
33             map.addLayer(new OpenLayers.Layer.Text("IP Locations", {
34                 location: map_file, projection: new OpenLayers.Projection("EPSG:4326")} ) );
35
36             var lonlat = (new OpenLayers.LonLat(0.0, 0.0));
37             lonlat.transform(map.displayProjection, map.projection);
38             map.setCenter(lonlat, 2);
39         }
40         // -->
41     </script>
42   </head>
43   <body onload="init()">
44     <div id="map"></div>
45   </body>
46 </html>