diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2009-02-11 20:25:17 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2009-02-11 20:25:17 +0000 |
commit | f8e5b17dbd053a30b43e7292d82177a81d4d5f9d (patch) | |
tree | c87bf00640b3a8f261596e387a65d4cc73ad7a3e /ipmap.html | |
parent | 425480c962a1f139e8533765bf7b0c0ba474a022 (diff) |
add support for a simple GeoIP based IP Location Map, more details will follow on the dev-list
svn path=/trunk/; revision=27433
Diffstat (limited to 'ipmap.html')
-rw-r--r-- | ipmap.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ipmap.html b/ipmap.html new file mode 100644 index 0000000000..090a395482 --- /dev/null +++ b/ipmap.html @@ -0,0 +1,41 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Wireshark: IP Location Map</title> + <script src="http://openlayers.org/api/OpenLayers.js"></script> + <script src="http://openstreetmap.org/openlayers/OpenStreetMap.js"></script> + + <script type="text/javascript"> + <!-- + var map; + + function init(){ + var map = new OpenLayers.Map("map", { + controls: [ + new OpenLayers.Control.PanZoomBar(), + new OpenLayers.Control.ScaleLine(), + new OpenLayers.Control.MousePosition(), + new OpenLayers.Control.MouseDefaults(), + new OpenLayers.Control.Attribution()], + projection: new OpenLayers.Projection("EPSG:900913"), + displayProjection: new OpenLayers.Projection("EPSG:4326"), + maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34, + 20037508.34, 20037508.34), + numZoomLevels: 18, + maxResolution: 156543, + units: "m"}); + + map.addLayer(new OpenLayers.Layer.OSM.Mapnik("Mapnik")); + map.addLayer(new OpenLayers.Layer.Text( "IP Locations", { location:"ipmap.txt", projection: new OpenLayers.Projection("EPSG:4326")} ) ); + + var lonlat = (new OpenLayers.LonLat(10.0, 20.0)); + lonlat.transform(map.displayProjection, map.projection); + map.setCenter(lonlat, /* zoom */ 2); + } + // --> + </script> + </head> + <body onload="init()"> + <div id="map"></div> + </form> + </body> +</html> |