Skip to content

Commit

Permalink
Add city services to map. Add EPA remediation sites to map. Add healt…
Browse files Browse the repository at this point in the history
…h services sites to map. Delete unused images. Remove avid from map - they are confusing.
  • Loading branch information
skininthegame committed Dec 4, 2011
1 parent c7e8dae commit 825f20c
Show file tree
Hide file tree
Showing 15 changed files with 197 additions and 49 deletions.
File renamed without changes.
14 changes: 0 additions & 14 deletions war/data/gis/site_remediation.js

This file was deleted.

10 changes: 10 additions & 0 deletions war/data/gis/site_remediation_little_village.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added war/images/fire_station.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added war/images/hhs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added war/images/police.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed war/images/private_school.png
Binary file not shown.
Binary file removed war/images/public_school.png
Binary file not shown.
Binary file modified war/images/toxic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 50 additions & 18 deletions war/index.html
Expand Up @@ -578,24 +578,56 @@ <h1>Mi Mapa</h1>
</div><!-- /grid-a -->
</li>
<li>
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/factory.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
Community-Submitted Toxic Site
</div>
</div>
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 70px">
<img src="images/aviso_asthma_small.png" style="width: 20px">
<img src="images/aviso_air_small.png" style="width: 20px">
<img src="images/aviso_community_small.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 200px">
Community Alerts / Aviso
</div>
</div>
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/toxic.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
Community-Submitted Toxic Site
</div>
</div>
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/aviso_community_small.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
EPA Remediation Site
</div>
</div>
</li>
<li>
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/aviso_asthma_small.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
Hospital
</div>
</div>
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/hhs.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
Health Service / Women & Children Center
</div>
</div>
<!-- <div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/police.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
Police Station
</div>
</div> -->
<div class="ui-grid-a ui-bar small">
<div class="ui-block-a" style="width: 30px">
<img src="images/fire_station.png" style="width: 20px">
</div>
<div class="ui-block-b" style="width: 250px">
Fire Station
</div>
</div>
</li>
</ul>
</div>
Expand Down
14 changes: 10 additions & 4 deletions war/src/App.js
Expand Up @@ -2,7 +2,9 @@
define([
'../data/gis/community_south_lawndale',
'views/GreenMapOverlay',
// 'views/EPAMapOverlay',
'views/HealthServicesMapOverlay',
'views/EPAMapOverlay',
'views/CityServicesMapOverlay',
'views/SchoolsMapOverlay',
'views/NeighborspaceGardensMapOverlay',
'views/TrafficCountsMapOverlay',
Expand All @@ -14,7 +16,9 @@ define([
], function(
LittleVillageGeoJSON,
GreenMapOverlay,
// EPAMapOverlay,
HealthServicesMapOverlay,
EPAMapOverlay,
CityServicesMapOverlay,
SchoolsMapOverlay,
NeighborspaceGardensMapOverlay,
TrafficCountsMapOverlay,
Expand Down Expand Up @@ -122,14 +126,16 @@ define([

// Fixed overlays
new GreenMapOverlay({ el: $("#mapa"), map: map });
//new EPAMapOverlay({ el: $("#mapa"), map: map });
new HealthServicesMapOverlay({ el: $("#mapa"), map: map });
new EPAMapOverlay({ el: $("#mapa"), map: map });
new CityServicesMapOverlay({ el: $("#mapa"), map: map });
new SchoolsMapOverlay({ el: $("#mapa"), map: map });
new TrafficCountsMapOverlay({ el: $("#mapa"), map: map });
new NeighborspaceGardensMapOverlay({ el: $("#mapa"), map: map });

// Toggle-able overlays
new ToxicMapOverlay({ el: $("#mapa"), map: map });
new AvisoMapOverlay({ el: $("#mapa"), collection: avisoCollection, map: map });
//new AvisoMapOverlay({ el: $("#mapa"), collection: avisoCollection, map: map });

// Pages
new IdeaCollection({ el: $('#Ideas'), collection: new Backbone.Collection(ideas) });
Expand Down
55 changes: 55 additions & 0 deletions war/src/views/CityServicesMapOverlay.js
@@ -0,0 +1,55 @@
define([
'../../data/gis/fire_stations_little_village',
// '../../data/gis/police_stations_little_village'
], function(fire/*, police*/) {
return Backbone.View.extend({

// police: null,

initialize: function() {
// this.police = new GeoJSON(police, {
// icon: "images/police.png"
// });

if (typeof google === 'undefined') return this;
this.render();
return this;
},

renderFeatureCollection: function(collection, map) {
console.log(collection)
if (collection.length) {
_(collection).each(function(feature) {
if (feature.length) {
_(feature).each(function(f) {
f.setMap(map);
});
} else {
feature.setMap(map);
}
});
} else {
collection.setMap(map);
}
return this;
},

render: function() {
var that = this;

// this.renderFeatureCollection(this.police, this.options.map);

_(fire.data).each(function(arr){
var marker = new google.maps.Marker({
position: new google.maps.LatLng(arr[14][1], arr[14][2]),
icon: 'images/fire_station.png',
flat: true,
clickable: false,
map: that.options.map
});
});

return this;
}
});
});
33 changes: 21 additions & 12 deletions war/src/views/EPAMapOverlay.js
@@ -1,19 +1,18 @@
define([
'../../data/gis/epa'
], function(epa) {
'../../data/gis/site_remediation_little_village'
], function(site) {
return Backbone.View.extend({
epa: null,

initialize: function() {
if (typeof google === 'undefined') return this;

this.epa = new GeoJSON(epa, {
strokeColor: "#343434",
strokeWeight: 1,
strokeOpacity: 0.75,
fillOpacity: 1,
fillColor: "#343434"
});
// this.epa = new GeoJSON(epa, {
// strokeColor: "#343434",
// strokeWeight: 1,
// strokeOpacity: 0.75,
// fillOpacity: 1,
// fillColor: "#343434"
// });

this.render();
return this;
Expand All @@ -37,8 +36,18 @@ define([
return this;
},

render: function() {
this.renderFeatureCollection(this.epa, this.options.map);
render: function() {
var that = this;
//this.renderFeatureCollection(this.epa, this.options.map);
_(site.data).each(function(arr){
var marker = new google.maps.Marker({
position: new google.maps.LatLng(arr[10], arr[11]),
icon: 'images/aviso_community_small.png',
flat: true,
clickable: false,
map: that.options.map
});
});
return this;
}
});
Expand Down
50 changes: 50 additions & 0 deletions war/src/views/HealthServicesMapOverlay.js
@@ -0,0 +1,50 @@
define([
'../../data/gis/health_human_services_little_village',
'../../data/gis/hospitals_little_village'
], function(hhs, hospitals) {
return Backbone.View.extend({

hospitals: null,

initialize: function() {
if (typeof google === 'undefined') return this;

this.hospitals = new GeoJSON(hospitals, {
icon: "images/aviso_asthma_small.png"
});

var that = this;
_(hhs.data).each(function(arr){
var marker = new google.maps.Marker({
position: new google.maps.LatLng(arr[19][1], arr[19][2]),
icon: 'images/hhs.png',
flat: true,
clickable: false,
map: that.options.map
});
});

this.renderFeatureCollection(this.hospitals, this.options.map);

return this;
},

// obj can be null to remove
renderFeatureCollection: function(collection, obj) {
if (collection.length) {
_(collection).each(function(feature) {
if (feature.length) {
_(feature).each(function(f) {
f.setMap(obj);
});
} else {
feature.setMap(obj);
}
});
} else {
collection.setMap(obj);
}
return this;
}
});
});
2 changes: 1 addition & 1 deletion war/src/views/ToxicMapOverlay.js
Expand Up @@ -20,7 +20,7 @@ define([
_(placemarks).each(function(item){
var marker = new google.maps.Marker({
position: new google.maps.LatLng(item.lon, item.lat),
icon: 'images/factory.png',
icon: 'images/toxic.png',
});

var message = {
Expand Down

0 comments on commit 825f20c

Please sign in to comment.