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

    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