• JMap.Map.Filter.applyAttributeValueEqualTo

    Render only layer's features that has attributeId having value equals to attributeValue

    Only one attribute filter can be set for a specific layer and attributeId at the same time.

    Parameters

    • layerId: JId

      The JMap layer id

    • attributeId: string

      The JMap attribute id

    • attributeValue: any

      The attribute value

    Returns string

    The filter id. By example for layer 4 and attribute 'on_off' => "attribute-4-on_off"

    Throws

    Error if layer or attribute is not found

    Example

    // Will render features having "name" equals to "Aquarius" for layer 4
    JMap.Map.Filter.applyAttributeValueEqualTo(4, "name", "Aquarius")