openlayers / ol-cesium

OpenLayers - Cesium integration
http://openlayers.org/ol-cesium/
BSD 2-Clause "Simplified" License
1.01k stars 329 forks source link

EPSG:4326 image tiles; tiles from wrong zoom used #457

Open MattBlissett opened 7 years ago

MattBlissett commented 7 years ago

This demo: https://tile.gbif.org/ui/Globe/temp-debug.html displays 2D and 3D maps using raster tiles in WGS84 / EPSG:4326, 512px wide, with two tiles at zoom 0. (Except for the size, this is the closest I could find to a standard tile schema for this projection.)

However, when activating the 3D view, I need to change the tileUrlFunction:

.replace('{z}', (tileCoord[0] - tileZoomOffset).toString())

tileZoomOffset is set to 0 (as expected) for the 2D map, but needs to be set to 1 for the 3D map.

Am I missing something? This worked without any hacks in Web Mercator projection, but the data extends beyond 85°.

I've added markers at Anchorage, Wellington and Niamey (Niger) to show the tiles align correctly in both views.

(The purpose will be to show maps of biodiversity observations/specimens, like this.)

gberaudo commented 7 years ago

Hello, @MattBlissett, I don't know what causes this. Maybe a bug in the support of tile size.