Published
Edited
Oct 19, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
container = html`<div style='height:600px;' />`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
profile = {
return {
// profileVisualImpairment: profileVisualImpairment === 'true',
// profileSlopePossible: profileSlopePossible === 'true',
profileQuestionElevator: profileQuestionElevator === 'true',
profileQuestionMaxStepHeight: profileQuestionMaxStepHeight,
profileQuestionMinimumWidth: profileQuestionMinimumWidth,
profileQuestionSeating: profileQuestionSeating === 'true',
profileQuestionCover: profileQuestionCover === 'true',
profileRampNeeded: profileWheelchairs.includes(profileModality),
profileQuestionRampWanted: profileQuestionRamp === 'true',
profileMinimalPlatformHeightTram: profileQuestionRamp === 'true' ? .07 : 0,
profileModality: profileModality,
profileEmbarkmentSpace: profileEmbarkmentSpace
};
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
////////////////////////////////////////////////
/// All profile > haltedata logic is in here ///
////////////////////////////////////////////////

profileAccessibleCalculation = el => {
const entr = el.properties.accessibility.entrances[0];
return (
// TODO: bij combihaltes een accessible waarde voor tram en bus geven
//
// wider than profile width
// TODO: niet alleen naar minimum breedte maar ook breedte instapplek kijken (moet nog in a11yjson)
entr.width.value >= profile.profileQuestionMinimumWidth &&
//
// lower than max stepheight if there is a stairs (drempel) and if there is no elevator
(entr.stairs && !hasEquipmenCategory(el, 'elevator')
? entr.stairs.stepHeight.value <=
profile.profileQuestionMaxStepHeight / 100
: true) &&
//
// higher than minimal platform height for trams
(el.properties.transportMode === 'tram'
? el.properties.accessibility.ground.elevation.value >=
profile.profileMinimalPlatformHeightTram
: true) &&
//
// check for elevators: halte has elevator OR the ground level is 0 OR an elevator is not needed in user // profile
(hasEquipmenCategory(el, 'elevator') ||
el.properties.accessibility.ground.level === 0 ||
!profile.profileQuestionElevator) &&
//
// check for seating OR seating not needed in user profile
(hasEquipmenCategory(el, 'seating') || !profile.profileQuestionSeating) &&
//
// check for shelter OR shelter not needed in user profile
(hasEquipmenCategory(el, 'shelter') || !profile.profileQuestionCover)
);
}
Insert cell
// check if an object with a certain category exists in the equipmentInfo array
hasEquipmenCategory = (el, category) =>
el.properties.equipmentInfo.filter(el =>
el.properties ? el.properties.category === category : false
)[0]
? true
: false
Insert cell
halteDataA11yJSONAms.data.features.map(
el => el.properties.accessibility.ground.isLevel
)
Insert cell
map.getSource('haltes').setData(halteDataProfiel.data)
// als data verandert, mapbox data updaten
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
map.flyTo({ center, zoom: zoom ? 16 : 11 })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { autoSelect } from "@jashkenas/inputs"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more