Add wrapX option to ol.source.XYZ #1868

Merged
merged 2 commits into from Mar 17, 2014

Projects

None yet

2 participants

@twpayne
Contributor
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
src/objectliterals.jsdoc
@@ -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
fredj Mar 17, 2014 Member

horizontally instead of horziontally

@twpayne
twpayne Mar 17, 2014 Contributor

Thanks, fixed.

@fredj
Member
fredj commented Mar 17, 2014

LGTM

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

1 check was pending

default The Travis CI build is in progress
Details
@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