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)
Sublayers: Walking, Stroller, Wheelchair
-- Walkability results are obtained from 3 endpoints ("cityIo/.../walkability_adult", "cityIo/.../walkability_wheelchair", ...)
Subresults: Schools, Groceries, Culture
-- Each walkability result contains 3 subresults (walkability towards schools, groceries or cultural institutions)
If specified in the config.json, all sublayers and subresults will be displayed in the layer menu.
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"
}
],
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.
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" } ],