Waze Map Editor JavaScript SDK
    Preparing search index...

    Class LayerSwitcher

    Methods for interacting with LayerSwitcher.

    Index

    Methods

    • Add a new checkbox to the SDK Layer checkboxes list

      Parameters

      • __namedParameters: { isChecked?: boolean; name: string }
        • OptionalisChecked?: boolean

          Optional. Initial checked state of the checkbox. Defaults to false.

        • name: string

          The name of the checkbox to add.

      Returns void

      InvalidStateError if the checkbox with the specified name already exists for this script

    • Get visibility state of a default WME layer.

      Parameters

      Returns boolean

      true if the layer is visible, or false otherwise.

    • Get checked state of the SDK Layers checkbox

      Parameters

      • args: { name: string }
        • name: string

          The name of the checkbox to get checked state.

      Returns boolean

      value of the checkbox

      InvalidStateError if a checkbox with the specified name does not exist for this script

    • Remove the checkbox from the SDK Layers checkboxes

      Parameters

      • args: { name: string }
        • name: string

          The name of the checkbox to remove.

      Returns void

      InvalidStateError if a checkbox with the specified name does not exist for this script

    • Set checked state for the default WME Closures layer checkbox

      Parameters

      • args: { isChecked: boolean }
        • isChecked: boolean

          The checked state to set to checkbox.

      Returns void

    • Set checked state for the default WME Hazards layer checkbox

      Parameters

      • args: { isChecked: boolean }
        • isChecked: boolean

          The checked state to set to checkbox.

      Returns void

    • Set checked state for the default WME Junction Boxes layer checkbox

      Parameters

      • args: { isChecked: boolean }
        • isChecked: boolean

          The checked state to set to checkbox.

      Returns void

    • Set checked state for the SDK Layers checkbox

      Parameters

      • args: { isChecked: boolean; name: string }
        • isChecked: boolean

          The checked state to set to checkbox.

        • name: string

          The name of the checkbox to set checked state.

      Returns void

      InvalidStateError if a checkbox with the specified name does not exist for this script

    • Set checked state for the default WME Paths layer checkbox

      Parameters

      • args: { isChecked: boolean }
        • isChecked: boolean

          The checked state to set to checkbox.

      Returns void

    • Set checked state for the default WME Venues layer checkbox

      Parameters

      • args: { isChecked: boolean }
        • isChecked: boolean

          The checked state to set to checkbox.

      Returns void

    • Set checked state for the default WME Roads layer checkbox

      Parameters

      • args: { isChecked: boolean }
        • isChecked: boolean

          The checked state to set to checkbox.

      Returns void

    • Set visibility for a default WME layer. This updates both the map display and the Layer Switcher sidebar checkbox.

      Parameters

      • args: { isVisible: boolean; layerName: WmeLayerName }
        • isVisible: boolean

          Set to true to show the layer, or false to hide it.

        • layerName: WmeLayerName

          The name of the WME layer.

      Returns void