Change 131
Change 131 by packetrat@packetrat-thinkpad on 2005/03/19 20:05:51
green pin = open, red pin = WEP. there are a LOT of green pins in kitsilano.
(no I did not connect to any of them, officer)
Affected files ...| //depot/projects/wardrive-map/kismet2xml.pl#2 | xtext | |
| //depot/projects/wardrive-map/map.html#3 | text |
==== //depot/projects/wardrive-map/kismet2xml.pl#2 (xtext) ====
| @@ -23,6 +23,7 @@ | ||
| 23 | 23 | lat => $lat, |
| 24 | 24 | lon => $lon, |
| 25 | 25 | chan => $n->{channel}, |
| 26 | wep => ($n->{wep} && $n->{wep} eq 'true') ? 1 : 0, | |
| 26 | 27 | }; |
| 27 | 28 | } |
| 28 | 29 | } |
| @@ -34,7 +35,7 @@ | ||
| 34 | 35 | $ssid =~ s/&/&/g; |
| 35 | 36 | $ssid =~ s/</</g; |
| 36 | 37 | $ssid =~ s/"/"/g; |
| 37 | printf qq{ <net bssid="%s" ssid="%s" lat="%.6f" lng="%.6f" chan="%s"/>\n}, | |
| 38 | $b, $ssid, $n->{lat}, $n->{lon}, $n->{chan}; | |
| 38 | printf qq{ <net bssid="%s" ssid="%s" lat="%.6f" lng="%.6f" chan="%s" wep="%d"/>\n}, | |
| 39 | $b, $ssid, $n->{lat}, $n->{lon}, $n->{chan}, $n->{wep}; | |
| 39 | 40 | } |
| 40 | 41 | print "</nets>\n"; |
==== //depot/projects/wardrive-map/map.html#3 (text) ====
| @@ -25,8 +25,18 @@ | ||
| 25 | 25 | return new ActiveXObject("Microsoft.XMLHTTP"); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | function makeMarker(p, html) { | |
| 29 | var m = new GMarker(p); | |
| 28 | function pin(color) { | |
| 29 | var icon = new GIcon(); | |
| 30 | icon.image = "icons/" + color + ".png"; | |
| 31 | icon.iconSize = new GSize(12, 20); | |
| 32 | icon.iconAnchor = new GPoint(6, 20); | |
| 33 | icon.infoWindowAnchor = new GPoint(5, 1); | |
| 34 | return icon; | |
| 35 | } | |
| 36 | var openPin = pin("green"), wepPin = pin("red"); | |
| 37 | ||
| 38 | function makeMarker(p, icon, html) { | |
| 39 | var m = new GMarker(p, icon); | |
| 30 | 40 | GEvent.addListener(m, "click", function() { m.openInfoWindowHtml(html); }); |
| 31 | 41 | return m; |
| 32 | 42 | } |
| @@ -41,7 +51,8 @@ | ||
| 41 | 51 | parseFloat(nets[i].getAttribute("lat"))); |
| 42 | 52 | var html = "<b>" + nets[i].getAttribute("ssid") + "</b><br/>ch " + |
| 43 | 53 | nets[i].getAttribute("chan"); |
| 44 | map.addOverlay(makeMarker(p, html)); | |
| 54 | var icon = nets[i].getAttribute("wep") == "1" ? wepPin : openPin; | |
| 55 | map.addOverlay(makeMarker(p, icon, html)); | |
| 45 | 56 | } |
| 46 | 57 | document.getElementById("status").innerHTML = nets.length + " networks"; |
| 47 | 58 | }; |