Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer search: return attribution value #3360

Open
fredj opened this issue Jan 14, 2020 · 4 comments
Open

Layer search: return attribution value #3360

fredj opened this issue Jan 14, 2020 · 4 comments
Assignees

Comments

@fredj
Copy link
Member

fredj commented Jan 14, 2020

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 the layersConfig.json file

@procrastinatio
Copy link
Contributor

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?

@procrastinatio procrastinatio self-assigned this Jan 15, 2020
@davidoesch
Copy link
Contributor

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

@fredj
Copy link
Member Author

fredj commented Feb 5, 2020

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).

@p1d1d1
Copy link
Contributor

p1d1d1 commented Feb 5, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants