Skip to content

v-map-style

← Zur Übersicht · @npm9912/v-map

Props

NameTypeAttrDefaultBeschreibung
autoApplybooleanauto-applytrueWhether to automatically apply the style when loaded.
contentstringcontentInline style content as string (alternative to src).
formatcesium-3d-tiles | geostyler | lyrx | mapbox-gl | qgis | sldformat'sld'The styling format to parse (supports 'sld', 'mapbox-gl', 'qgis', 'lyrx', 'cesium-3d-tiles').
layerTargetsstringlayer-targetsTarget layer IDs to apply this style to. If not specified, applies to all compatible layers.
srcstringsrcThe style source - can be a URL to fetch from or inline SLD/style content.

Events

EventDetail-TypeBeschreibung
styleErrorErrorFired when style parsing fails.
styleReady{ style?: ResolvedStyle; layerIds?: string[]; }Fired when style is successfully parsed and ready to apply.

Methods

  • getLayerTargetIds() => Promise<string[]> — Get the target layer IDs as array. async
  • getStyle() => Promise<ResolvedStyle> — Get the currently parsed style.