Skip to content

Commit

Permalink
fix #55?
Browse files Browse the repository at this point in the history
  • Loading branch information
trivisonno committed Nov 1, 2023
1 parent 65a80a9 commit 84dd349
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions crosssection.html
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ <h5 id="offcanvasRightLabel">Aerial Lane Viewer</h5>
calcStreetStats(streetsAsGeojson['features'][0])
return streetsAsGeojson;
});

}
}

Expand Down
2 changes: 2 additions & 0 deletions js/osmtostreetmix.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ function generateCrossSectionTable(feature) {
'left;through': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-straight-inbound.svg',
'through;left': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-straight-inbound.svg',
'through;right': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-straight-inbound.svg',
'through;slight_right': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-straight-inbound.svg',
'right;through': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-straight-inbound.svg',
'right': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-inbound.svg',
'left': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-inbound.svg',
Expand All @@ -205,6 +206,7 @@ function generateCrossSectionTable(feature) {
'left;through': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-straight-outbound.svg',
'through;left': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-straight-outbound.svg',
'through;right': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-straight-outbound.svg',
'through;slight_right': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-straight-outbound.svg',
'right;through': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-straight-outbound.svg',
'right': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/right-outbound.svg',
'left': 'https://raw.githubusercontent.com/streetmix/illustrations/main/images/markings/left-outbound.svg',
Expand Down
8 changes: 6 additions & 2 deletions map.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h4 class="modal-title" id="exampleModal2Label"><span id="location-name"></span>
subdomains: 'abcd',
maxZoom: 18
}).addTo(map);
var Stamen_TonerLabels = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-labels/{z}/{x}/{y}{r}.png', {
var Stamen_TonerLabels = L.tileLayer('https://tiles.stadiamaps.com/tiles/stamen_toner_labels/{z}/{x}/{y}{r}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',
subdomains: 'abcd',
maxZoom: 18,
Expand Down Expand Up @@ -324,7 +324,7 @@ <h4 class="modal-title" id="exampleModal2Label"><span id="location-name"></span>
colorHex = colors[3];
opacity = 1
// dashArrayStr='1'
} else if(feature.properties.tags['highway'] == "cycleway" || feature.properties.tags['cycleway'] == "separate" || feature.properties.tags['cycleway:right'] == "separate" || feature.properties.tags['cycleway:left'] == "separate" || feature.properties.tags['cycleway:both'] == "separate" || feature.properties.tags['bicycle'] == 'use_sidepath' || (feature.properties.tags['highway'] == 'footway' && feature.properties.tags['bicycle'] == 'yes') || (feature.properties.tags['highway']=='path' && (feature.properties.tags['bicycle']=='designated' || feature.properties.tags['bicycle']=='yes'))) {
} else if(feature.properties.tags['highway'] == "cycleway" || feature.properties.tags['cycleway'] == "separate" || feature.properties.tags['cycleway:right'] == "separate" || feature.properties.tags['cycleway:left'] == "separate" || feature.properties.tags['cycleway:both'] == "separate" || feature.properties.tags['bicycle'] == 'use_sidepath' || (feature.properties.tags['highway'] == 'footway' && feature.properties.tags['bicycle'] == 'yes') || (feature.properties.tags['highway']=='path' && (feature.properties.tags['bicycle']=='designated' || feature.properties.tags['bicycle']=='yes')) || ((Object.keys(feature.properties.tags).includes('cycleway:right:separation:left') == true && feature.properties.tags['cycleway:right:separation:left'] != 'barred_area'))) {
colorHex = colors[4];
} else {
//colorHex = colors[0];
Expand All @@ -336,6 +336,10 @@ <h4 class="modal-title" id="exampleModal2Label"><span id="location-name"></span>
}
}

if( ((Object.keys(feature.properties.tags).includes('cycleway:right:separation:left') == true && feature.properties.tags['cycleway:right:separation:left'] != 'barred_area')) && ((Object.keys(feature.properties.tags).includes('cycleway:left:separation:left') == true && feature.properties.tags['cycleway:left:separation:left'] != 'barred_area'))) {
colorHex = colors[4];
}



return {
Expand Down

0 comments on commit 84dd349

Please sign in to comment.