diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index f23a5a1..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "public/javascripts/geojson"] - path = public/javascripts/geojson - url = https://github.com/JasonSanford/GeoJSON-to-Google-Maps.git diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index dae36cf..ce0815f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - AdoptAHydrant + Adopt a Hydrant <%= stylesheet_link_tag "main" %> <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" %> <%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false" %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index a9874bf..67a32df 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,3 +1,28 @@ -
- +
+
+ diff --git a/public/images/hydrant-in-snow.jpg b/public/images/hydrant-in-snow.jpg new file mode 100644 index 0000000..15af25d Binary files /dev/null and b/public/images/hydrant-in-snow.jpg differ diff --git a/public/javascripts/geojson b/public/javascripts/geojson deleted file mode 160000 index d04e436..0000000 --- a/public/javascripts/geojson +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d04e43652e8e8eeaddf106667c0da79659d620d7 diff --git a/public/javascripts/maps.js b/public/javascripts/maps.js index 7269a81..bf9c28f 100644 --- a/public/javascripts/maps.js +++ b/public/javascripts/maps.js @@ -1,75 +1,12 @@ $(function() { var map; - currentFeature_or_Features = null; - - var roadStyle = { - strokeColor: "#FFFF00", - strokeWeight: 7, - strokeOpacity: 0.75 - }; - - var addressStyle = { - icon: "images/marker-hydrant.png" - }; - - var parcelStyle = { - strokeColor: "#FF7800", - strokeOpacity: 1, - strokeWeight: 2, - fillColor: "#46461F", - fillOpacity: 0.25 - }; var latlng = new google.maps.LatLng(42.358431,-71.059773); var myOptions = { - zoom: 14, + zoom: 15, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); - function getHydrants() { - $.ajax({ - url: "http://civicapi.couchone.com/boston_fire_hydrants/_design/geo/_spatiallist/geojson/points", - dataType: 'jsonp', - data: { - "bbox":"-71.07326030731201,42.35568977315507,-71.04317665100098,42.37176642783948" - }, - success: function(data){ - showFeature(data, addressStyle); - } - }); - } - - function clearMap(){ - if (!currentFeature_or_Features) - return; - if (currentFeature_or_Features.length){ - for (var i = 0; i < currentFeature_or_Features.length; i++){ - currentFeature_or_Features[i].setMap(null); - } - }else{ - currentFeature_or_Features.setMap(null); - } - } - - function showFeature(geojson, style){ - clearMap(); - currentFeature_or_Features = new GeoJSON(geojson, style || null); - if (currentFeature_or_Features.type && currentFeature_or_Features.type == "Error"){ - document.getElementById("put_geojson_string_here").value = currentFeature_or_Features.message; - return; - } - if (currentFeature_or_Features.length){ - for (var i = 0; i < currentFeature_or_Features.length; i++){ - currentFeature_or_Features[i].setMap(map); - } - }else{ - currentFeature_or_Features.setMap(map) - } - - document.getElementById("put_geojson_string_here").value = JSON.stringify(geojson); - } - - getHydrants(); }) diff --git a/public/stylesheets/.gitkeep b/public/stylesheets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 9049a57..1500e21 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1,24 +1,45 @@ -html { height: 100% } -body { height: 100%; margin: 0px; padding: 0px } -#map_canvas { height: 100% } -#left{ - width: 500px; - height: 500px; - float:left; +html { + height: 100%; } -#right{ - width: 200px; - height: 500px; - float:left; - padding: 10px; + +body { + font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; + height: 100%; + margin: 0px; + padding: 0px; } -#right div{ - margin-bottom: 8px; + +#map_canvas { + float: left; + height: 100%; + width: 75%; } -#right textarea{ - height: 150px; - width: 300px; + +#sidebar { + float: left; + height: 100%; + text-align: center; + width: 25%; + overflow: hidden; +} + +p, form { + margin: auto; + width: 80%; + margin-top: 20px; +} + +#sidebar img { + width: 100%; +} + +input, select, option, button { + margin-bottom: 20px; + text-align: center; + font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; + font-size: 1.0em; +} + +input, button { + width: 100%; } -#map{ - height:100%; -} \ No newline at end of file