Make map methods tolerant of layers without renderers

This commit is contained in:
Tim Schaub
2018-11-15 12:35:54 +01:00
parent 96dd5417e3
commit 3f624ec0c0
2 changed files with 7 additions and 4 deletions

View File

@@ -130,6 +130,9 @@ class CompositeMapRenderer extends MapRenderer {
const layer = layerState.layer;
if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {
const layerRenderer = this.getLayerRenderer(layer);
if (!layerRenderer) {
continue;
}
result = layerRenderer.forEachLayerAtCoordinate(coordinate, frameState, hitTolerance, callback, thisArg);
if (result) {
return result;