openlayers / ol-cesium

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

vectortiles with inverted Y doesn't display in 3d #918

Open MichaelTang778 opened 3 years ago

MichaelTang778 commented 3 years ago

If vector tile has inverted Y axis, the vector tile doesn't display in 3d.

Example:

var source = new ol.source.VectorTile({
    format: new ol.format.MVT(),
    url: 'api/vectortile/{z}/{x}/{-y}.pbf'
})

The console debugger complains about the following url:

api/vectortile/6/20/%7B-y%7D.pbf

It appears that the replacement of the Y axis with the actual coordinate doesn't take into account of flipped Y axis.

If I decode that url I get the following

api/vectortile/6/20/{-y}.pbf

gberaudo commented 3 years ago

Hi @MichaelTang778, thanks for the bug report. I created a PR to fix this. Can you test it?

MichaelTang778 commented 3 years ago

I downloaded the pull request branch and tested it. It seems to work fine. Excellent job.