gbif / maps

GBIF mapping service built on HBase and ElasticSearch, supporting Mapbox Vector Tiles and PNGs
Apache License 2.0
48 stars 16 forks source link

map demo13 shows wrong tile value for y #72

Open jhnwllr opened 1 year ago

jhnwllr commented 1 year ago

I find this demo useful for navigating map tiles, as users sometimes request a static map.

https://api.gbif.org/v2/map/demo13.html#map=4.721949986524806/-230.5/37.74/0

I believe both y values should be zero in this image:

image

MattBlissett commented 1 year ago

There are/were two ways of addressing map tiles, either with the origin at the top left, or the bottom left.

The version of OpenLayers used here has a different internal addressing scheme than the most common way, used by our tiles, so the Y values are negative. It is indeed confusing.

https://api.gbif-uat.org/v1/geocode/debug/map.html uses a newer version of OpenLayers, so the solution will be to upgrade OpenLayers on these demos.