Skip to content

Commit

Permalink
Remove missing layers (testing Mapbox error)
Browse files Browse the repository at this point in the history
ws-isochrone and trips-from-focus
  • Loading branch information
Annabelle Thomas Taylor committed Jun 3, 2020
1 parent 42eb89e commit a1eb397
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h3 class="layers__subtitle">Average trips to focus area</h3>
<input type="radio" id="to_trips_walk" name="layer__radio-options" autocomplete="off">
<label for="to_trips_walk">Walking trips</label><br>

<h3 class="layers__subtitle">Average trips from focus area</h3>
<!-- <h3 class="layers__subtitle">Average trips from focus area</h3>
<input type="radio" id="from_trips_total" name="layer__radio-options" autocomplete="off">
<label for="from_trips_total">Total trips</label><br>
Expand All @@ -95,15 +95,15 @@ <h3 class="layers__subtitle">Average trips from focus area</h3>
<label for="from_trips_bike">Bike trips</label><br>
<input type="radio" id="from_trips_walk" name="layer__radio-options" autocomplete="off">
<label for="from_trips_walk">Walking trips</label><br>
<label for="from_trips_walk">Walking trips</label><br> -->

<h3 class="layers__subtitle">Minimum travel time</h3>
<!-- <h3 class="layers__subtitle">Minimum travel time</h3>
<input type="radio" id="from_west_station" name="layer__radio-options" autocomplete="off">
<label for="from_west_station">Travel time from West Station</label><br>
<input type="radio" id="to_west_station" name="layer__radio-options" autocomplete="off">
<label for="to_west_station">Travel time to West Station</label><br>
<label for="to_west_station">Travel time to West Station</label><br> -->

<!-- <h3 class="layers__subtitle">2040 projection choropleths</h3>
<input type="radio" id="lrtp_hh" name="layer__radio-options" autocomplete="off">
Expand Down
8 changes: 4 additions & 4 deletions map.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ map.on('load', () => {
} else {
const clickedData = map.queryRenderedFeatures(
[e.point.x, e.point.y],
{ layers: ['taz', 'mbta-stops', 'West Station', 'mbta-routes', 'massbuilds', '2040-blocks', 'trips-to-focus', 'trips-from-focus', 'ws-isochrone'] },
{ layers: ['taz', 'mbta-stops', 'West Station', 'mbta-routes', 'massbuilds', '2040-blocks', 'trips-to-focus'] },
);
if (clickedData.some(item => item.properties.layer != null)) {
const mbtaData = clickedData.find(item => item.properties.layer != undefined).properties;
Expand Down Expand Up @@ -904,13 +904,13 @@ function resetMap() {
map.setLayoutProperty('focus-area-buffer', 'visibility', 'none');
map.setLayoutProperty('2040-blocks', 'visibility', 'none');
map.setLayoutProperty('trips-to-focus', 'visibility', 'none');
map.setLayoutProperty('trips-from-focus', 'visibility', 'none');
map.setLayoutProperty('ws-isochrone', 'visibility', 'none');
// map.setLayoutProperty('trips-from-focus', 'visibility', 'none');
// map.setLayoutProperty('ws-isochrone', 'visibility', 'none');
map.setLayoutProperty('openspace', 'visibility', 'none');
}

function displayCorrectLayer(selectedLayer) {
const layers = ['ws-isochrone', 'taz', 'trips-to-focus', 'trips-from-focus', '2040-blocks'];
const layers = ['taz', 'trips-to-focus', '2040-blocks'];
layers.forEach((layer) => {
if (layer === selectedLayer) {
map.setLayoutProperty(layer, 'visibility', 'visible');
Expand Down

0 comments on commit a1eb397

Please sign in to comment.