injectSiMapStyle Type documentation¶
TypeScript declaration¶
import { injectSiMapStyle } from '@siemens/element-ng/maplibre';Creates a signal that returns a StyleSpecification for MapLibre GL based on the current Element theme. The signal automatically updates when the theme switches between light and dark.
@remarks: Must be called in an Angular injection context (e.g. inside a constructor, field initializer, or a function called from one). Calling this function outside of an injection context will throw an assertInInjectionContext error.
Returns: A signal that provides the current StyleSpecification based on the active theme
Throws: When called outside of an Angular injection context
injectSiMapStyle(key: string): Signal<StyleSpecification>
Creates a signal that returns a StyleSpecification for MapLibre GL based on the current Element theme. The signal automatically updates when the theme switches between light and dark.
@remarks: Must be called in an Angular injection context (e.g. inside a constructor, field initializer, or a function called from one). Calling this function outside of an injection context will throw an assertInInjectionContext error.
Returns: A signal that provides the current StyleSpecification based on the active theme
Throws: When called outside of an Angular injection context
Except where otherwise noted, content on this site is licensed under MIT License.