[OpenLayers-Dev] MVT: Problems with missing pbf files

Christian Mayer ml-cm at meggsimum.de
Thu Oct 19 08:11:36 PDT 2017


Hi OL-Devs,

I have a setup with a VectorTile layer based on Mapbox Vector Tiles
(created with GeoServer / Geowebcache). To save time at transferring the
pbf-files to the target environment all empty pbf-files were deleted.
This results in HTTP 404s (of course) when OpenLayers tries to load the
missing tiles.
I expected that this won't bring any problems and that OL is just
ignoring them. But unfortunately a JS-exception occurs if in the current
map-exent is one of the missing tiles.
It seems that the "tileProjection" is undefined for the given
"sourceTile", so the operation tileProjection.getUnits() fails, see here
[1]. So it seems that the missing tile is not ignored in the code and
due to the lack of information the rendering process fails.
If I add an emtpy pbf-file, so no HTTP 404 occurs anymore, the exception
is gone. Even though no more information is provided (from my humble
point of view).

So here are some questions: Can someone confirm this behavior? Is this
wanted behavior for some reasons? Or is this even a bug or an edge case?

I am using OpenLayers v4.3.4.

Thanks in advance for any hint / help / clarification.

Cheers
Chris

[1]
https://github.com/openlayers/openlayers/blob/v4.3.4/src/ol/renderer/canvas/vectortilelayer.js#L139

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20171019/a71e5a55/attachment.html>


More information about the Dev mailing list