Class: StyleFactory

StyleFactory

Factory for creating and applying style strategies.

new StyleFactory()

MapboxViewer/infrastructure/factories/StyleFactory.ts, line 12

Creates a StyleFactory instance with default strategies.

Methods

applyStyle(map, layerOpts)

MapboxViewer/infrastructure/factories/StyleFactory.ts, line 58

Applies the appropriate style strategy based on the layer options.

Name Type Description
map

The Mapbox map instance.

layerOpts

The options for the layer.

Returns:
A style conversion result compatible with Mapbox.

determineStrategy(layerOpts)

MapboxViewer/infrastructure/factories/StyleFactory.ts, line 34

Determines the appropriate style strategy based on layer options.

Name Type Description
layerOpts

The options for the layer.

Returns:
A style strategy instance.