Open fredj opened 4 years ago
Do you mean the search
service (http://api3.geo.admin.ch/services/sdiservices.html#search)?
You have the origin
attribute (zipcode
, gazeetter
, etc..) which gives you a hint about the attribution to set, far from ideal, I know. The trouble is that the layersConfig.json
is not supposed to be used outside map.geo.admin.ch.
Alternatively, you may use the layer metadata
service (http://api3.geo.admin.ch/services/sdiservices.html#layers-metadata), which is a bit more verbose
Metadata for all layer in the API: http://api3.geo.admin.ch/rest/services/api/MapServer
Searching a specific layer: http://api3.geo.admin.ch/rest/services/api/MapServer?searchText=bird&lang=en
@davidoesch @boecklic Any thought?
I fully agree with @procrastinatio It is all there
@fredj what is your specific use case? We need to go direction of the OGC API In the Future
Hi,
What I want to do is the same as the search input in map.geo.admin.ch: let the user search for a layer (using the search service) and add the selected layer to the map (a cesium map in my case).
You could pass the layer name as value for "searchText" to the "layer metadata service" and read the attribution in "dataOwner" e.g. http://api3.geo.admin.ch/rest/services/api/MapServer?searchText=ch.bafu.bundesinventare-jagdbanngebiete&lang=en
It would be nice if the layer search service could return the
attribution
value in the result (swisstopo
,OFCOM
, ...). This information is currently (if I remember correctly) only present in thelayersConfig.json
file