Class representing a store

Constructors

  • Create a store

    Parameters

    • config: Record<string, any>

      Configuration

    Returns Store

Properties

_baselayersConfig: object
_country: string
_geometry: object
_indicatorColors: string[]
_indicators: Record<string, any>
_indicatorsInfo: Record<string, any>
_indicatorsProjected: Record<string, any>
_iso: Record<string, any>
_labels: object
_layers: Record<string, any>
_layersConfig: object
_overlaysConfig: object
_overlaysLayer: { [layerName: string]: any } = {}
_overlaysOptions: any = {}
_panel: Record<string, any>
config: object
panel: Record<string, any>

Accessors

  • get allOverlaysLayer(): { [layerName: string]: any }

    Get all layer options

    Returns { [layerName: string]: any }

    All layer options

  • get baselayersConfig(): { [key: string]: any }

    Get baselayers configuration

    Returns { [key: string]: any }

    baselayersConfig - Object with configuration

  • set baselayersConfig(baselayersConfig: { [key: string]: any }): void

    Set baselayers configuration

    Parameters

    • baselayersConfig: { [key: string]: any }

      Object with configuration

    Returns void

  • get country(): string

    Get country

    Returns string

    country - Country code

  • set country(country: string): void

    Set country

    Parameters

    • country: string

      Country code

    Returns void

  • get geometry(): { [key: string]: any }

    Get geometry

    Returns { [key: string]: any }

    geometry - Geometry object with GeoJSON

  • set geometry(geometry: { [key: string]: any }): void

    Set geometry

    Parameters

    • geometry: { [key: string]: any }

      Geometry object with GeoJSON

    Returns void

  • get indicatorColors(): string[]

    Get indicator colors

    Returns string[]

    _indicatorColors - Indicator colors

  • get indicators(): Record<string, any>

    Get indicators

    Returns Record<string, any>

    Object with indicators data

  • get indicatorsInfo(): Record<string, any>

    Get indicators info

    Returns Record<string, any>

    Object with indicators info

  • get indicatorsProjected(): Record<string, any>

    Get indicators projected

    Returns Record<string, any>

    Object with indicators info

  • get iso(): { [key: string]: any }

    Get ISO codes

    Returns { [key: string]: any }

    geometry - Object with labels

  • set iso(geometryConfig: { [key: string]: any }): void

    Set ISO codes

    Parameters

    • geometryConfig: { [key: string]: any }

      Geometry object with ISO codes

    Returns void

  • get labels(): { [key: string]: any }

    Get labels

    Returns { [key: string]: any }

    geometry - Object with labels

  • set labels(labelsConfig: { [key: string]: any }): void

    Set labels

    Parameters

    • labelsConfig: { [key: string]: any }

      Object with labels

    Returns void

  • get layers(): Record<string, any>

    Get layers

    Returns Record<string, any>

    Object with OpenLayer layers

  • get layersConfig(): { [key: string]: any }

    Get geometry

    Returns { [key: string]: any }

    geometry - Geometry object with GeoJSON

  • set layersConfig(layersConfig: { [key: string]: any }): void

    Set layers configuration

    Parameters

    • layersConfig: { [key: string]: any }

      Object with configuration

    Returns void

  • get overlaysConfig(): { [key: string]: any }

    Get baselayers configuration

    Returns { [key: string]: any }

    baselayersConfig - Object with configuration

  • set overlaysConfig(overlaysConfig: { [key: string]: any }): void

    Set overlays configuration

    Parameters

    • overlaysConfig: { [key: string]: any }

      Object with configuration

    Returns void

  • get overlaysOptions(): any

    Get options

    Returns any

    options - Current options

  • set overlaysOptions(options: any): void

    Set options

    Parameters

    • options: any

      Options for the overlays

    Returns void

Methods

  • Add indicator data

    Parameters

    • country: string

      Country code (com/mdg/mus/syc)

    • category: string

      Indicator category key

    • indicatorKey: string

      Indicator key

    • indicatorData: { [key: string]: any }

      Object with indicator data

    Returns void

  • Add indicators info

    Parameters

    • country: string

      Country code (com/mdg/mus/syc)

    • category: string

      Indicator category key

    • indicatorKey: string

      Indicator key

    • indicatorInfo: { [key: string]: any }

      Object with indicator info

    Returns void

  • Add indicators projected

    Parameters

    • country: string

      Country code (com/mdg/mus/syc)

    • category: string

      Indicator category key

    • indicatorKey: string

      Indicator key

    • indicatorProjected: { [key: string]: any }

      Object with indicator projected

    Returns void

  • Add layer

    Parameters

    • country: string

      Country code (com/mdg/mus/syc)

    • level: string

      Geometry level (adm_0/adm_1/adm_2)

    • layer: Record<any, any>

      OpenLayers layer

    Returns void

  • Add indicator layer to map

    Parameters

    • hexColor: any

      Country code (com/mdg/mus/syc)

    • steps: number

      Category

    Returns string[]

    stepColors

  • Get options for a specific layer

    Parameters

    • layerName: string

      Name of the layer

    Returns any

    Layer or undefined if not found

  • Set options for a specific layer

    Parameters

    • layerName: string

      Name of the layer

    • layer: any

      layer

    Returns void

  • Read Color Picker and calculates color skala

    Parameters

    • colorPicker: HTMLInputElement

      color picker element

    • steps: number = 5

      Steps

    Returns void