Allow use of specific default liveatlas by setting a map's icon to "liveatlas_[icon_name]" in the map plugin's configuration

This commit is contained in:
James Lyne 2021-12-28 16:09:44 +00:00
parent b94c6c66e2
commit 53c2ecab71

View File

@ -93,7 +93,7 @@ export default class LiveAtlasMapDefinition {
} }
hasCustomIcon(): boolean { hasCustomIcon(): boolean {
return !!this.icon; return !!this.icon && !this.icon.startsWith('liveatlas_');
} }
getIcon(): string { getIcon(): string {
@ -101,6 +101,10 @@ export default class LiveAtlasMapDefinition {
mapType: string; mapType: string;
if(this.icon) { if(this.icon) {
if(this.icon.startsWith('liveatlas_')) {
return this.icon.replace('liveatlas_', '');
}
return this.icon; return this.icon;
} }