@terrestris/ol-util
    Preparing search index...

    Helper class for adding layers from various file formats.

    Index

    Constructors

    Methods

    • Adds a new vector layer from a geojson string.

      Parameters

      • json:
            | string
            | FeatureCollection<Geometry, GeoJsonProperties>
            | FeatureCollection<Geometry, GeoJsonProperties>[]

        the geojson string or object

      • map: Map

        the map to add the layer to

      Returns void

    • Adds a new vector layer from a geojson file.

      Parameters

      • file: File

        the file to read the geojson from

      • map: Map

        the map to add the layer to

      Returns void

    • Adds a new vector layer from a shape file (zip).

      Parameters

      • file: File

        the file to read the geojson from

      • map: Map

        the map to add the layer to

      Returns void