@geogirafe/lib-geoportal
    Preparing search index...

    Search provider for the Swiss search service of geo.admin.ch. See documentation at https://docs.geo.admin.ch/access-data/search.html

    The GeoAdmin search provider allows 3 different types of searches:

    • locations: POIs like addresses, swissnames, boundaries, parcels
    • layers: layers of the GeoAdmin portal
    • features: features inside one or multiple layers of the GeoAdmin portal

    This client currently only supports location search. The API returns max 50 items per request.

    Configuration:

    • providerName: The name of the search provider, or geoadminch.
    • resultSrid: The spatial reference system (SRID) of the search results, always EPSG:2056.
    • bbox: Comma-separated list of bounding box coordinates in EPSG:2056 (e.g. "2580000,1150000,2600000,1200000") If no bbox is set, the max extent of the map is used.
    • locationOrigins: Array of categories that are searched. Default: All categories. Available categories and data origin: - zipcode (ch.swisstopo-vd.ortschaftenverzeichnis_plz) - gg25 (ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill) - district (ch.swisstopo.swissboundaries3d-bezirk-flaeche.fill) - kantone (ch.swisstopo.swissboundaries3d-kanton-flaeche.fill) - gazetteer (ch.swisstopo.swissnames3d, ch.bav.haltestellen-oev) - address (ch.swisstopo.amtliches-gebaeudeadressverzeichnis, including EGID) - parcel

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    geoJsonFormatter: GeoJSON<Feature<Geometry, { [x: string]: any }>> = ...
    providerName: string
    resultSrid: string
    searchLangPlaceholder: "###SEARCHLANG###" = '###SEARCHLANG###'
    searchTermPlaceholder: "###SEARCHTERM###" = '###SEARCHTERM###'
    type: string
    url: URL

    Accessors

    Methods

    • Parses the response from the server and returns an array of features. Features must have the following properties to be used correctly with the search component:

      • provider
      • label
      • label_html: optional, for styled entries in the search results list
      • actions: optional, a list of SearchResultsActions

      Parameters

      • response: Response

      Returns Promise<Feature<Geometry, { [x: string]: any }>[]>