Skip to content

Commit

Permalink
fix (olHelpers.js): update wrapX default setting to account for false…
Browse files Browse the repository at this point in the history
…y evaluation (#331)
  • Loading branch information
StevenHeinrich authored and juristr committed Nov 3, 2016
1 parent 073eb4d commit 40e4972
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
tileLoadFunction: source.tileLoadFunction,
attributions: createAttribution(source),
tilePixelRatio: pixelRatio > 1 ? 2 : 1,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
case 'MapBoxStudio':
Expand All @@ -232,7 +232,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
tileLoadFunction: source.tileLoadFunction,
attributions: createAttribution(source),
tileSize: source.tileSize || [512, 512],
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
case 'ImageWMS':
Expand Down Expand Up @@ -261,7 +261,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
crossOrigin: (typeof source.crossOrigin === 'undefined') ? 'anonymous' : source.crossOrigin,
params: deepCopy(source.params),
attributions: createAttribution(source),
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
};

if (source.serverType) {
Expand Down Expand Up @@ -300,7 +300,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
matrixIds: source.tileGrid.matrixIds
}),
style: (source.style === 'undefined') ? 'normal' : source.style,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
};

if (isDefined(source.url)) {
Expand All @@ -318,7 +318,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
oSource = new ol.source.OSM({
tileLoadFunction: source.tileLoadFunction,
attributions: createAttribution(source),
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});

if (source.url) {
Expand All @@ -338,7 +338,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
attributions: createAttribution(source),
imagerySet: source.imagerySet ? source.imagerySet : bingImagerySets[0],
culture: source.culture,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
};

if (source.maxZoom) {
Expand All @@ -357,7 +357,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
oSource = new ol.source.MapQuest({
attributions: createAttribution(source),
layer: source.layer,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});

break;
Expand All @@ -375,7 +375,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
attributions: createAttribution(source),
tileLoadFunction: source.tileLoadFunction,
url: _url,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});

break;
Expand All @@ -389,7 +389,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
attributions: createAttribution(source),
tileLoadFunction: source.tileLoadFunction,
url: source.url,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});

break;
Expand Down Expand Up @@ -501,7 +501,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
attributions: createAttribution(source),
tileLoadFunction: source.tileLoadFunction,
crossOrigin: 'anonymous',
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;

Expand All @@ -518,7 +518,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
tileGrid: new ol.tilegrid.createXYZ({
maxZoom: source.maxZoom || 19
}),
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;

Expand Down Expand Up @@ -549,7 +549,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

return url;
},
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
case 'TileImage':
Expand All @@ -571,7 +571,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
.replace('{y}', y.toString());
return url;
},
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
case 'KML':
Expand All @@ -591,7 +591,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
oSource = new ol.source.Stamen({
tileLoadFunction: source.tileLoadFunction,
layer: source.layer,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
case 'ImageStatic':
Expand Down Expand Up @@ -621,7 +621,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
projection: source.projection,
tileUrlFunction: source.tileUrlFunction,
tileLoadFunction: source.tileLoadFunction,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
case 'Zoomify':
Expand All @@ -631,7 +631,7 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
oSource = new ol.source.Zoomify({
url: source.url,
size: source.imageSize,
wrapX: source.wrapX || true
wrapX: source.wrapX !== undefined ? source.wrapX : true
});
break;
}
Expand Down

0 comments on commit 40e4972

Please sign in to comment.