county-of-simcoe-gis / SimcoeCountyWebViewer

Web Map Viewer built with React and OpenLayers. Built for GeoServer and ArcGIS Server.
MIT License
136 stars 43 forks source link

Uncommented Sidebar object Merge removes the flexibility to configure different maps with no real benefit. #159

Closed oren-ned closed 2 years ago

oren-ned commented 2 years ago

When the Sidebar Object Merge is commented out:

reed-tom commented 2 years ago

The array merge is meant to facilitate minor changes to the default. You can override any value of the built in sidebar items or disable them with an a short config. For example you could disable all the built in themes: "sidebarThemeComponents": [ { "id": 1, "enabled": false }, { "id": 2, "enabled": false }, { "id": 3, "enabled": false }, { "id": 4, "enabled": false }, { "id": 5, "enabled": false }, { "id": 6, "enabled": false }, { "id": 7, "enabled": false }, { "id": 8, "enabled": false } ]

or you could override the name or icon of a tool or theme or change some of the default behaviour of a theme, You can also override some of the theme or tool internal config elements by providing an optional config key. For example, here I override the internal config of the Commercial real estate theme to turn off a layer and hide featured properties by default: "sidebarThemeComponents": [ { "id": 7, "name": "Commercial Real Estate", "config": { "featurePropertyPanelOpen": false, "toggleLayers": [ { "serverUrl": "https://opengis.simcoe.ca/geoserver/", "layerName": "simcoe:Economic Employment Districts", "displayName": "Provincially Designated Employment Land", "clickable": true, "legendStyleName": "", "visible": true, "zIndex": 209, "expanded": false, "description": "" }, { "serverUrl": "https://opengis.simcoe.ca/geoserver/", "layerName": "simcoe:Economic_Development_Business_Improvement_Area", "displayName": "Business Improvement Area", "clickable": true, "legendStyleName": "", "visible": true, "zIndex": 208, "expanded": false, "description": "Housing Support Agencies help people who are looking for affordable rental housing or at risk of losing their current housing. Housing Support Agencies can help you learn what is available in the County to help you obtain and retain housing." }, { "serverUrl": "https://opengis.simcoe.ca/geoserver/", "layerName": "simcoe:Economic_Development_Municipal_Incentives", "displayName": "Municipal Incentives", "clickable": true, "legendStyleName": "", "visible": false, "zIndex": 207, "expanded": false, "description": "Employment Ontario Employment Services are available across the County of Simcoe to help newcomers look for a job, plan their careers, explore starting their own business and obtain referrals to community programs and services." } ] } } ]

reed-tom commented 2 years ago

Seems that code didn't paste very well, here is an image: image