From d6967e65025e859b5ed90cb63074cd9ba375a2a3 Mon Sep 17 00:00:00 2001 From: Jordan Rousseau Date: Mon, 26 Jan 2015 19:18:27 -0600 Subject: [PATCH 1/5] added basic map FTW!!! --- map.html | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 map.html diff --git a/map.html b/map.html new file mode 100644 index 0000000..d64b497 --- /dev/null +++ b/map.html @@ -0,0 +1,78 @@ + + + + + + A simple map + + + + + + + + +
+ + + + From d447519c96ba5af5f0a68c6a318c556dc2aa9e7c Mon Sep 17 00:00:00 2001 From: Jordan Rousseau Date: Mon, 26 Jan 2015 19:20:07 -0600 Subject: [PATCH 2/5] move layers front and back. Renamed title --- map.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/map.html b/map.html index d64b497..381e7cf 100644 --- a/map.html +++ b/map.html @@ -3,7 +3,7 @@ - A simple map + School Stuffs @@ -69,9 +69,9 @@ } }); - omnivore.topojson('data_ingest_node/data/schoolDistricts.topojson', null, district_layer).addTo(map); + omnivore.topojson('data_ingest_node/data/schoolDistricts.topojson', null, district_layer).addTo(map).bringToBack(); - omnivore.topojson('data_ingest_node/data/schools.topojson', null, school_layer).addTo(map); + omnivore.topojson('data_ingest_node/data/schools.topojson', null, school_layer).addTo(map).bringToFront(); From 9642ce005b50cc44fc8022f0d238d187ed61f0f7 Mon Sep 17 00:00:00 2001 From: Jordan Rousseau Date: Mon, 26 Jan 2015 19:24:15 -0600 Subject: [PATCH 3/5] added layer control so it does not look gross --- map.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/map.html b/map.html index 381e7cf..27d23c8 100644 --- a/map.html +++ b/map.html @@ -69,9 +69,14 @@ } }); - omnivore.topojson('data_ingest_node/data/schoolDistricts.topojson', null, district_layer).addTo(map).bringToBack(); + var topo_district = omnivore.topojson('data_ingest_node/data/schoolDistricts.topojson', null, district_layer); - omnivore.topojson('data_ingest_node/data/schools.topojson', null, school_layer).addTo(map).bringToFront(); + var topo_schools = omnivore.topojson('data_ingest_node/data/schools.topojson', null, school_layer); + + L.control.layers({ + 'School Polygons': topo_schools.addTo(map), + 'District Polygons': topo_district + }).addTo(map); From d1a3286481bb7dc015ebefa7f76e2410b8fdcb1b Mon Sep 17 00:00:00 2001 From: Dee Wu Date: Thu, 29 Jan 2015 20:48:01 -0600 Subject: [PATCH 4/5] Create mapFindsClosestSchool.html --- mapFindsClosestSchool.html | 100 +++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 mapFindsClosestSchool.html diff --git a/mapFindsClosestSchool.html b/mapFindsClosestSchool.html new file mode 100644 index 0000000..463855c --- /dev/null +++ b/mapFindsClosestSchool.html @@ -0,0 +1,100 @@ + + + + + + School Stuffs + + + + + + + + + +
+ + + + From 2c7a4cb464c90722e66cf5aa78af6ff89daf544b Mon Sep 17 00:00:00 2001 From: Dee Wu Date: Thu, 29 Jan 2015 20:49:51 -0600 Subject: [PATCH 5/5] Update mapFindsClosestSchool.html I tested seems to work and prints out the closest school based on distance to the bbox searching through all schools in geojson file (turned off districts for the moment), compare with map.html --- mapFindsClosestSchool.html | 1 + 1 file changed, 1 insertion(+) diff --git a/mapFindsClosestSchool.html b/mapFindsClosestSchool.html index 463855c..d97383a 100644 --- a/mapFindsClosestSchool.html +++ b/mapFindsClosestSchool.html @@ -1,6 +1,7 @@ + School Stuffs