TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.17k stars 362 forks source link

make blacklists also work for paths/groups #3039

Closed meh9 closed 2 years ago

meh9 commented 6 years ago

Some/all of the CatalogItem/Groups have a blacklist property you can use to filter out specific layers from being shown. We should make this work for subpaths/groups as well - not just layer names.

I've recently needed this for an esri-group, and have added it here in the hope that it will work in the future:

https://github.com/TerriaJS/aremi-natmap/blob/2018-08-06/datasources/aremi/custodian/Australian_Bureau_of_Statistics/All_ABS_Boundaries.ejs#L11

So specifically in that example we are rendering the entire hierarchy found at this address into the catalogue:

https://geo.abs.gov.au/arcgis/rest/services

There are a few paths there that we don't want to show, e.g. CACHE, Commuting2016, etc. It would be great if the blacklist could be used for that as well.

Potentially, for extra credit, a blacklistRegexes property would be amazing!

nf-s commented 2 years ago

This can be done using excludeMembers - see https://github.com/TerriaJS/terriajs/pull/5838