injectSiMapTranslations Type documentation¶
TypeScript declaration¶
Provides translated MapLibre locale strings as an Angular signal. The record uses MapLibre's original locale keys, such as Example: Returns: A signal containing a MapLibre locale record, for example Provides translated MapLibre locale strings as an Angular signal. The record uses MapLibre's original locale keys, such as Example: Returns: A signal containing a MapLibre locale record, for example import { injectSiMapTranslations } from '@siemens/element-ng/maplibre';AttributionControl.ToggleAttribution, and updates when the active Element language changes.@Component({ ... })
export class MapComponent {
protected readonly mapTranslations = injectSiMapTranslations();
}
<mgl-map [locale]="mapTranslations()" />
{ 'AttributionControl.ToggleAttribution': 'Toggle attribution' }.injectSiMapTranslations(): Signal<Record<string, string>> AttributionControl.ToggleAttribution, and updates when the active Element language changes.@Component({ ... })
export class MapComponent {
protected readonly mapTranslations = injectSiMapTranslations();
}
<mgl-map [locale]="mapTranslations()" />
{ 'AttributionControl.ToggleAttribution': 'Toggle attribution' }.
Except where otherwise noted, content on this site is licensed under MIT License.