From 94bcb8a0f68f4085fdccdae821117ebcccfce99a Mon Sep 17 00:00:00 2001 From: Olivier Guyot Date: Thu, 15 Nov 2018 09:32:02 +0100 Subject: [PATCH] Added wrapX option on graticule --- examples/graticule.js | 3 ++- src/ol/layer/Graticule.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/graticule.js b/examples/graticule.js index 22b4d5f87d..32d2196b9b 100644 --- a/examples/graticule.js +++ b/examples/graticule.js @@ -21,7 +21,8 @@ const map = new Map({ width: 2, lineDash: [0.5, 4] }), - showLabels: true + showLabels: true, + wrapX: false }) ], target: 'map', diff --git a/src/ol/layer/Graticule.js b/src/ol/layer/Graticule.js index ca30cd2e8d..e6c156289f 100644 --- a/src/ol/layer/Graticule.js +++ b/src/ol/layer/Graticule.js @@ -128,6 +128,7 @@ const INTERVALS = [ * ```js * [30, 10] * ``` + * @property {boolean} [wrapX=true] Whether to repeat the graticule horizontally. */ @@ -388,7 +389,8 @@ class Graticule extends VectorLayer { strategy: bbox, features: new Collection(), overlaps: false, - useSpatialIndex: false + useSpatialIndex: false, + wrapX: options.wrapX }) );