Constructors

Properties

Methods

Constructors

  • Constructor: OpenLayers.StyleMap

    Parameters: style - {Object} Optional. Either a style hash, or a style object, or a hash of style objects (style hashes) keyed by rendering intent. If just one style hash or style object is passed, this will be used for all known render intents (default, select, temporary) options - {Object} optional hash of additional options for this instance

    Parameters

    • Optionalstyle: Record<string, unknown> | Style | { [key: string]: Style }
    • Optionaloptions: {}

    Returns StyleMap

Properties

extendDefault: boolean

Property: extendDefault {Boolean} if true, every render intent will extend the symbolizers specified for the "default" intent at rendering time. Otherwise, every rendering intent will be treated as a completely independent style.

styles: { [key: string]: Style }

Property: styles {Object} Hash of {<OpenLayers.Style>}, keyed by names of well known rendering intents (e.g. "default", "temporary", "select", "delete").

Methods

  • Function: OpenLayers.StyleMap.addUniqueValueRules

    Convenience method to create comparison rules for unique values of a property. The rules will be added to the style object for a specified rendering intent. This method is a shortcut for creating something like the “unique value legends” familiar from well known desktop GIS systems

    Parameters:

    Parameters

    • renderIntent: string

      {String} rendering intent to add the rules to

    • property: string

      {String} values of feature attributes to create the rules for

    • symbolizers: Record<string, SymbolizerProperties>

      {Object} Hash of symbolizers, keyed by the desired property values

    • Optionalcontext: unknown

      {Object} An optional object with properties that symbolizers’ property values should be evaluated against. If no context is specified, feature.attributes will be used

    Returns Symbolizer