CityScope / CSL_Hamburg_Grasbrook

CityScope Frontend for HCU+MIT Grasbrook Project
5 stars 2 forks source link

Collapsible sub layers #108

Closed andredaa closed 4 years ago

andredaa commented 4 years ago

Introducing grouped layers. Layers can contain a group of sublayers that have similar contents to render, but listen to a different endpoint Layers can even contain subresults that are included in the information coming from the endpoint.

First Used Case

Walkability for different walking speeds (walking, walking with stroller, wheelchair)

If specified in the config.json, all sublayers and subresults will be displayed in the layer menu. image

How to add sublayers or subresults

Sublayers

in order to add grouped sublayers to a layer, in config.json add "groupedLayersData": [ { "displayName": "Adult", "id": "walkability_adult", "url": "https://cityio.media.mit.edu/api/table/grasbrook_test/walkability_walking", "propertyToDisplay": "educational", "legendStyleField": "educational", "legendDescription": "A visualization of walking time (in minutes) needed to reach the closest school." }, {...}, ]

Subresults

To add subresults in config.json add to your layer : "subResults": [ { "id": "educational", "label": "Schools" }, { "id": "grocery", "label": "Groceries" }, { "id": "culture", "label": "Cultural Institutions" } ],

andredaa commented 4 years ago

layer loading indicator no longer works

fixed