From e731574e06cf71ceff84b2bb8ae7d8792bf74857 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Thu, 20 Feb 2020 17:49:05 +0000 Subject: [PATCH] Fix disappearing labels when rotation returns to 0 --- src/ol/layer/Graticule.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index 622a03f6fd..f1480dddc9 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -611,7 +611,7 @@ class Graticule extends VectorLayer { for (index = 0, l = this.meridiansLabels_.length; index < l; ++index) { const lineString = this.meridians_[index]; if (!rotation) { - textPoint = this.getMeridianPoint_(lineString, this.renderedExtent_, index); + textPoint = this.getMeridianPoint_(lineString, extent, index); } else { const clone = lineString.clone(); clone.rotate(-rotation, rotationCenter); @@ -628,7 +628,7 @@ class Graticule extends VectorLayer { for (index = 0, l = this.parallels_.length; index < l; ++index) { const lineString = this.parallels_[index]; if (!rotation) { - textPoint = this.getParallelPoint_(lineString, this.renderedExtent_, index); + textPoint = this.getParallelPoint_(lineString, extent, index); } else { const clone = lineString.clone(); clone.rotate(-rotation, rotationCenter);