Closed nichtich closed 4 weeks ago
There should already be a working (simple) map view when a single coordinate is given via concept.location.coordinates
, but as mentioned, we need some examples.
Example https://uri.gbv.de/terminology/test/21994501-b31d-4bef-bdad-da11cce4c7e8
jskos-proxy needs to explicitly ask dante API for location
property:
Now implemented in Dev. Two issues:
location
is, for some reason, not loaded: https://coli-conc.gbv.de/terminology/test/21994501-b31d-4bef-bdad-da11cce4c7e8 This should be a DANTE issue: https://api.dante.gbv.de/voc/top?properties=+location&uri=http:%2F%2Furi.gbv.de%2Fterminology%2Ftest%2FThe field location is not loaded in the example, because the example is from testpool and there is a special situation with different masks. This behaviour is different in "real" / "prod" - Pools. Use for example: https://api.dante.gbv.de/voc/top?uri=http:%2F%2Furi.gbv.de%2Fterminology%2Fprizepapers_place%2F&cache=false&properties=+location&limit=50
Zoom: in our plugins we use zoom level 15 for points. For polygons so far into the bounds that there is still a bit of edge everywhere..
I've set the default zoom level to 15 for Points. For many examples, it still seems way too far zoomed in though.
Other than that, all GeoJSON data supported by Leaflet should work now. Other than the example from the test pool that does not load the location
field, do we have examples for other location types than Point
?
Also, can we expect there to be always one element in location
, and if not, can you provide examples when there are multiples? Currently, it should show multiple maps, but it would be better to show all data in one map.
Here a polygon-example: https://api.dante.gbv.de/data?uri=https://uri.gbv.de/terminology/prizepapers_place/ebf8ca1f-2218-4cf4-9d8c-ec545dd1b450&properties=+location LineString is also allowed in DANTE, but used very rarely. multiple geoJSONs are also possible, but probably not used anywhere. Multiple Maps are ok because it almost never happens anyway.
The polygon example also works: https://coli-conc.gbv.de/terminology/prizepapers_place/ebf8ca1f-2218-4cf4-9d8c-ec545dd1b450
I tested LineString locally and it should work. I think all GeoJSON points supported by Leaflet should work out of the box. I also implemented multiple locations in one map, even though it's a rare case. (Don't have an example, but works for me locally.)
It would be nice to be able to differentiate between cities or bigger location points, where zoom level 12 or 13 would be more appropriate, and actual single point locations, where zoom level 15 works well. Any opinions/ideas?
Other than that, this issue should be completed now. 👍
No information comes from DANTE as to what type of place it is. Theoretically we have fields “geonames-Type” and “gnd-place-type”, but nobody uses them. I think the only option would be to use a geocoding service. Reverse.
You could try: https://nominatim.openstreetmap.org/ui/reverse.html?lat=42.33665&lon=13.49121&zoom=18 (there is an api for that)
Even then it would be basically impossible to say whether a certain coordinate is meant to show the whole city or just one specific building in the center of the city. I guess I'll leave it at that for now.
Example for multiple locations: https://uri.gbv.de/terminology/areal_unit_niedersachsen/faa510c7-6be8-44fd-8af1-50d14c5b7e86
Requires good examples.