Hi all,
I extended the class ol.source.VectorTile in order to load VectorTiles
in different formats (GeoJSON and MVT) from a local GWC cache. While
upgrading from OpenLayers v3.20 to OpenLayers v4.x it seems that for MVT
the scope in the "tileUrlFunction" gets lost. It seems to be "window".
For GeoJSON-based VectorTiles everything is still running fine.
Below you find the crutial parts of my class:
ol.inherits(ol.source.GWCVT, ol.source.VectorTile);
ol.source.GWCVT.prototype.tileUrlFunction =
function(tileCoord, pixelRatio, projection) {
// here 'this' becomes 'window' in the second call
// assembling the URL
// ...
}
ol.source.GWCVT.prototype.setTileUrlFunction = function(tileUrlFunction) {
ol.source.VectorTile.prototype.setTileUrlFunction.call(this,
tileUrlFunction);
};
Thanks for any hint!
Cheers
Chris
_______________________________________________
Dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/openlayers-dev