terriajs
terriajs copied to clipboard
Option to remove specific trait when mixing traits
It will be useful to have an option to remove a specific trait from the list of traits. For example, currently, only Cesium3DTilesCatalogItem
uses featureInfoUrlTemplate
trait, but it is listed as a valid trait for all other catalog items. This is also useful from the documentation aspect.
This is also the case with attribution
which is a valid option in all catalog items except GtfsCatalogItem
.
Also for future development, it might be useful to have conflict traits option (when it is allowed to specify only one trait from the list of traits, as only one will be used).
Just my opinion: the right approach for now might be to refactor and move featureInfoUrlTemplate
out into its own Traits class so that it does not get mixed into all the other catalog items.
When we have this implemented - there is an instance where it should be applied here
- https://github.com/TerriaJS/terriajs/pull/6972#issuecomment-1814352273