Class LayersExperimental

API to control per-map layer management, visibility and interpolations.

Hierarchy

  • Layers

Methods

  • Experimental

    Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique

    Parameters

    • layerName: string
    • featureOrFeatureCollection: Feature<Polygon, GeoJsonProperties> | FeatureCollection<Polygon, GeoJsonProperties>

    Returns undefined | Promise<void>

  • Experimental

    Returns a mapping of all layers for a map, and whether they are visible or not.

    Parameters

    Returns Promise<{
        [layerName: string]: boolean;
    }>

  • Experimental

    Hides a GeoJSON layer from the map and removes it from the list of layers. It will not appear in getAllLayersForMap afterwards and can be overwritten by a new layer with the same name.

    Parameters

    • layerName: string

    Returns undefined | Promise<void>

  • Experimental

    Re-renders the map only showing the layers specified in the array. This will discard any polygons that have been highlighted.

    Parameters

    • layers: string[]

    Returns void