Add wrapX option to ol.source.XYZ #1868

merged 2 commits into from Mar 17, 2014


None yet

2 participants

twpayne commented Mar 17, 2014

This adds a wrapX option to disable world wrapping. Use it like this:

var source = new ol.source.XYZ({
  url: '/path/to/tiles/{z}/{x}/{y}',
  wrapX: false

Fixes #1864.

@fredj fredj and 1 other commented on an outdated diff Mar 17, 2014
@@ -994,6 +994,8 @@
* @property {string|undefined} url URL template. Must include `{x}`, `{y}`,
* and `{z}` placeholders.
* @property {Array.<string>|undefined} urls An array of URL templates.
+ * @property {boolean|undefined} wrapX Whether to wrap the world horziontally.
fredj Mar 17, 2014 Member

horizontally instead of horziontally

twpayne Mar 17, 2014 Contributor

Thanks, fixed.

fredj commented Mar 17, 2014


@twpayne twpayne merged commit ade384f into openlayers:master Mar 17, 2014

1 check was pending

default The Travis CI build is in progress
@twpayne twpayne deleted the twpayne:wrap-x branch Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment