Permalink
Browse files

debugged

  • Loading branch information...
1 parent 5065512 commit f98024c35786b34bcabe994746abdbcc79e9852b @architham committed Nov 25, 2012
View
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '3.2.9'
+gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
View
@@ -1,35 +1,35 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (3.2.9)
- actionpack (= 3.2.9)
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
mail (~> 2.4.4)
- actionpack (3.2.9)
- activemodel (= 3.2.9)
- activesupport (= 3.2.9)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.2.1)
- activemodel (3.2.9)
- activesupport (= 3.2.9)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
- activerecord (3.2.9)
- activemodel (= 3.2.9)
- activesupport (= 3.2.9)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.9)
- activemodel (= 3.2.9)
- activesupport (= 3.2.9)
- activesupport (3.2.9)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
- bcrypt-ruby (3.0.1)
+ bcrypt-ruby (3.0.1-x86-mingw32)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
@@ -45,7 +45,7 @@ GEM
railties (~> 3.1)
warden (~> 1.2.1)
erubis (2.7.0)
- eventmachine (1.0.0)
+ eventmachine (1.0.0-x86-mingw32)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
@@ -70,17 +70,17 @@ GEM
rack
rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.9)
- actionmailer (= 3.2.9)
- actionpack (= 3.2.9)
- activerecord (= 3.2.9)
- activeresource (= 3.2.9)
- activesupport (= 3.2.9)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
bundler (~> 1.0)
- railties (= 3.2.9)
- railties (3.2.9)
- actionpack (= 3.2.9)
- activesupport (= 3.2.9)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -93,12 +93,11 @@ GEM
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
- sprockets (2.2.1)
+ sprockets (2.1.3)
hike (~> 1.2)
- multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.6)
+ sqlite3 (1.3.6-x86-mingw32)
thin (1.5.0)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
@@ -116,14 +115,14 @@ GEM
rack (>= 1.0)
PLATFORMS
- ruby
+ x86-mingw32
DEPENDENCIES
coffee-rails (~> 3.2.1)
devise
jquery-rails
json
- rails (= 3.2.9)
+ rails (= 3.2.8)
sass-rails (~> 3.2.3)
sqlite3
thin
@@ -1,11 +1,12 @@
-
-function initialize()
-{
+var map;
+var parkLayer, openspaceLayer, publicartLayer, bikepathLayer, citylimitLayer, transitroutesLayer, neighborhoodLayer, policebeatLayer , femaexemptionLayer;
+var park, openspace, publicart, bikepaths, citylimits, transitroutes, neighborhoods, policebeats , femaexemptions;
+//$(document).ready(function () {
+function initialize() {
var contentString = 'Hello';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
- var map;
var latlng = new google.maps.LatLng(37.09, -95.71);
var options = {
zoom: 5,
@@ -19,18 +20,29 @@ function initialize()
position: google.maps.ControlPosition.TOP_RIGHT
}
};
-
-
-
-map = new google.maps.Map(document.getElementById('map'), options);
-
-
+ $('#park').attr('checked',false);
+ $('#openspace').attr('checked',false);
+ $('#publicart').attr('checked',false);
+ $('#bikepaths').attr('checked',false);
+ $('#citylimits').attr('checked',false);
+ $('#transitroutes').attr('checked',false);
+ $('#neighborhoods').attr('checked',false);
+ $('#policebeats').attr('checked',false);
+ $('#femaexemptions').attr('checked',false);
+ map = new google.maps.Map(document.getElementById('map'), options);
+ parkLayer = new google.maps.KmlLayer('http://data.cabq.gov/community/parksandrec/parks/CityParks.kmz');
+ openspaceLayer = new google.maps.KmlLayer('http://data.cabq.gov/community/openspace/CityOpenSpace.kmz');
+ publicartLayer = new google.maps.KmlLayer('http://data.cabq.gov/community/art/publicart/PublicArt.kmz');
+ bikepathLayer = new google.maps.KmlLayer('http://data.cabq.gov/community/bikepaths/BikePaths.kmz');
+ citylimitLayer = new google.maps.KmlLayer('http://data.cabq.gov/government/citylimits/abqcitylimits.kmz');
+ transitroutesLayer = new google.maps.KmlLayer('http://data.cabq.gov/transit/routesandstops/transitroutes.kmz');
+ neighborhoodLayer = new google.maps.KmlLayer('http://data.cabq.gov/community/neighborhoods/NeighborhoodAssociations.kmz');
+ policebeatLayer = new google.maps.KmlLayer('http://data.cabq.gov/publicsafety/policebeats/APD_BCSO_Beats.kmz');
+ femaexemptionLayer = new google.maps.KmlLayer('http://data.cabq.gov/FEMA/FEMA_exemptions_CABQ.kmz');
// ************************** Markers init on Log in ****************//
/*
Pass a GET request to the index function in Locations model to get the locations marked by the user.
-
*/
-
$.ajax({
type: "GET",
dataType: "json",
@@ -46,14 +58,11 @@ $.ajax({
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
- });
-
+ });
}
}
});
-
/* This particular sends an Ajax request to the controller to add the latitude and longitude of the points where there is a double click */
-
google.maps.event.addListener(map, 'dblclick', function(event) {
var marker = new google.maps.Marker({position: event.latLng, draggable: true, map: map});
google.maps.event.addListener(marker, 'click', function() {
@@ -70,20 +79,77 @@ google.maps.event.addListener(map, 'dblclick', function(event) {
});
});
-
-
-
+
// ***************** End of markers functions ************ ///
-
// ***************** Start of Info Boxes ***************//
-
-
-
/* var infowindow = new google.maps.InfoWindow({
content: 'Hello world'
});infowindow.open(map, marker);
-
*/
-
-
-}
+}
+function show() {
+ park = $('#park').is(":checked");
+ openspace = $('#openspace').is(":checked");
+ publicart = $('#publicart').is(":checked");
+ bikepaths = $('#bikepaths').is(":checked");
+ citylimits = $('#citylimits').is(":checked");
+ transitroutes = $('#transitroutes').is(":checked");
+ neighborhoods = $('#neighborhoods').is(":checked");
+ policebeats = $('#policebeats').is(":checked");
+ femaexemptions = $('#femaexemptions').is(":checked");
+ if(park){
+ parkLayer.setMap(map);
+ }
+ else{
+ parkLayer.setMap(null);
+ }
+ if (openspace) {
+ openspaceLayer.setMap(map);
+ }
+ else{
+ openspaceLayer.setMap(null);
+ }
+ if(publicart) {
+ publicartLayer.setMap(map);
+ }
+ else{
+ publicartLayer.setMap(null);
+ }
+ if(bikepaths) {
+ bikepathLayer.setMap(map);
+ }
+ else{
+ bikepathLayer.setMap(null);
+ }
+ if(citylimits) {
+ citylimitLayer.setMap(map);
+ }
+ else{
+ citylimitLayer.setMap(null);
+ }
+ if(transitroutes) {
+ transitroutesLayer.setMap(map);
+ }
+ else{
+ transitroutesLayer.setMap(null);
+ }
+ if(neighborhoods){
+ neighborhoodLayer.setMap(map);
+ }
+ else{
+ neighborhoodLayer.setMap(null);
+ }
+ if(policebeats){
+ policebeatLayer.setMap(map);
+ }
+ else{
+ policebeatLayer.setMap(null);
+ }
+ if(femaexemptions){
+ femaexemptionLayer.setMap(map);
+ }
+ else{
+ femaexemptionLayer.setMap(null);
+ }
+ //$(":checkbox").attr("autocomplete", "off");
+ }
@@ -11,7 +11,8 @@
*= require_self
*= require_tree .
*/
-#map{width: 70%;height: 400px;border: 1px solid #000; margin-top: 80px}
+#map{width: 70%; height: 400px;border: 1px solid #000; margin-top: 80px; float: left;}
+#formalign { float: right; width: 200px }
#home-heading
{
color: white;
@@ -1,3 +1,5 @@
// Place all the styles related to the Pages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
+#map{width: 70%;height: 400px;border: 1px solid #000; margin-top: 80px; float: left}
+#formalign { float: right; width: 200px }
@@ -10,7 +10,31 @@
<% if user_signed_in? %>
<div id="map" onload="initialize();">
</div>
-
+<div id="formalign" onload="uncheck();">
+ <!--h4>Datasets:</h4-->
+ <br><br><br>
+ <%= check_box_tag 'park', 'park', false %> Park
+ <br><br>
+ <%= check_box_tag 'openspace', 'openspace', false %> Open Space
+ <br><br>
+ <%= check_box_tag 'publicart', 'publicart', false %> Public Art
+ <br><br>
+ <%= check_box_tag 'bikepaths', 'bikepaths', false %> Bike Paths
+ <br><br>
+ <%= check_box_tag 'citylimits', 'citylimits', false %> City Limits
+ <br><br>
+ <%= check_box_tag 'transitroutes', 'transitroutes', false %> Transit Routes
+ <br><br>
+ <%= check_box_tag 'neighborhoods', 'neighborhoods', false %> ABQ Neighborhoods
+ <br><br>
+ <%= check_box_tag 'policebeats', 'policebeats', false %> Police Beats
+ <br><br>
+ <%= check_box_tag 'femaexemptions', 'femaexemptions', false %> Fema Exemptions
+ <br><br>
+
+ <%= tag "input", { "type" => "button", "value" => "Display", "onclick" => "show()" } %>
+
+</div>
<% else %>
<%= link_to "sign in", new_user_session_path %>
<div id='main-image'>

0 comments on commit f98024c

Please sign in to comment.