Skip to content

Commit

Permalink
fix(label): register the labellayer if added alone
Browse files Browse the repository at this point in the history
  • Loading branch information
zarov committed Jun 23, 2020
1 parent 2d78e58 commit fac67b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Core/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ function _preprocessLayer(view, layer, parentLayer) {
layer.projection = parentLayer && parentLayer.extent.crs;
}

if (layer.labelEnabled) {
if (layer.isLabelLayer) {
view.mainLoop.gfxEngine.label2dRenderer.registerLayer(layer);
} else if (layer.labelEnabled) {
const labelLayer = new LabelLayer(`${layer.id}-label`, view.referenceCrs);
labelLayer.source = source;
labelLayer.style = layer.style;
Expand Down

0 comments on commit fac67b9

Please sign in to comment.