Exemple #1
0
        public void Load()
        {
            string data = Http.Get("http://fatavio.com/calwifimap/get.php");
            data = data.Trim();
            string[] dataPoints = data.Split('\n');
            foreach (string dataPoint in dataPoints)
            {
                string[] r = dataPoint.Split(',');
                if (r[2] == "" || r[3] == "" || r[4] == "" || r[5] == "") continue;

                string latitude = r[0];
                string longitude = r[1];
                string ssid = Base64.Decode(r[2]);
                string bssid = r[3];
                string encryption = r[4];
                int strength = Convert.ToInt32(r[5]);

                string id = ssid + bssid;
                RouterData router;
                if (_Routers.ContainsKey(id))
                {
                    router = _Routers[id];
                }
                else
                {
                    router = new RouterData(ssid, bssid);
                    _IDs.Add(id);
                    _Routers.Add(id, router);
                }

                RouterDataPoint rdp = new RouterDataPoint(latitude, longitude, strength);
                router.AddDataPoint(rdp);
            }
        }
Exemple #2
0
 public void AddDataPoint(RouterDataPoint data)
 {
     _DataPoints.Add(data);
 }