@@ -212,7 +212,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
212
212
oSource = new ol . source . XYZ ( {
213
213
url : url ,
214
214
attributions : createAttribution ( source ) ,
215
- tilePixelRatio : pixelRatio > 1 ? 2 : 1
215
+ tilePixelRatio : pixelRatio > 1 ? 2 : 1 ,
216
+ wrapX : source . wrapX || true
216
217
} ) ;
217
218
break ;
218
219
case 'MapBoxStudio' :
@@ -228,7 +229,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
228
229
oSource = new ol . source . XYZ ( {
229
230
url : url ,
230
231
attributions : createAttribution ( source ) ,
231
- tileSize : source . tileSize || [ 512 , 512 ]
232
+ tileSize : source . tileSize || [ 512 , 512 ] ,
233
+ wrapX : source . wrapX || true
232
234
} ) ;
233
235
break ;
234
236
case 'ImageWMS' :
@@ -254,7 +256,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
254
256
var wmsConfiguration = {
255
257
crossOrigin : ( typeof source . crossOrigin === 'undefined' ) ? 'anonymous' : source . crossOrigin ,
256
258
params : deepCopy ( source . params ) ,
257
- attributions : createAttribution ( source )
259
+ attributions : createAttribution ( source ) ,
260
+ wrapX : source . wrapX || true
258
261
} ;
259
262
260
263
if ( source . serverType ) {
@@ -291,7 +294,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
291
294
resolutions : source . tileGrid . resolutions ,
292
295
matrixIds : source . tileGrid . matrixIds
293
296
} ) ,
294
- style : ( source . style === 'undefined' ) ? 'normal' : source . style
297
+ style : ( source . style === 'undefined' ) ? 'normal' : source . style ,
298
+ wrapX : source . wrapX || true
295
299
} ;
296
300
297
301
if ( isDefined ( source . url ) ) {
@@ -307,7 +311,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
307
311
308
312
case 'OSM' :
309
313
oSource = new ol . source . OSM ( {
310
- attributions : createAttribution ( source )
314
+ attributions : createAttribution ( source ) ,
315
+ wrapX : source . wrapX || true
311
316
} ) ;
312
317
313
318
if ( source . url ) {
@@ -325,7 +330,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
325
330
key : source . key ,
326
331
attributions : createAttribution ( source ) ,
327
332
imagerySet : source . imagerySet ? source . imagerySet : bingImagerySets [ 0 ] ,
328
- culture : source . culture
333
+ culture : source . culture ,
334
+ wrapX : source . wrapX || true
329
335
} ;
330
336
331
337
if ( source . maxZoom ) {
@@ -343,7 +349,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
343
349
344
350
oSource = new ol . source . MapQuest ( {
345
351
attributions : createAttribution ( source ) ,
346
- layer : source . layer
352
+ layer : source . layer ,
353
+ wrapX : source . wrapX || true
347
354
} ) ;
348
355
349
356
break ;
@@ -359,7 +366,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
359
366
360
367
oSource = new ol . source . XYZ ( {
361
368
attributions : createAttribution ( source ) ,
362
- url : _url
369
+ url : _url ,
370
+ wrapX : source . wrapX || true
363
371
} ) ;
364
372
365
373
break ;
@@ -371,7 +379,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
371
379
372
380
oSource = new ol . source . TileArcGISRest ( {
373
381
attributions : createAttribution ( source ) ,
374
- url : source . url
382
+ url : source . url ,
383
+ wrapX : source . wrapX || true
375
384
} ) ;
376
385
377
386
break ;
@@ -481,7 +490,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
481
490
oSource = new ol . source . TileJSON ( {
482
491
url : source . url ,
483
492
attributions : createAttribution ( source ) ,
484
- crossOrigin : 'anonymous'
493
+ crossOrigin : 'anonymous' ,
494
+ wrapX : source . wrapX || true
485
495
} ) ;
486
496
break ;
487
497
@@ -496,7 +506,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
496
506
format : source . format ,
497
507
tileGrid : new ol . tilegrid . createXYZ ( {
498
508
maxZoom : source . maxZoom || 19
499
- } )
509
+ } ) ,
510
+ wrapX : source . wrapX || true
500
511
} ) ;
501
512
break ;
502
513
@@ -525,7 +536,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
525
536
var url = source . url + z + '/' + x + '/' + y + '.png' ;
526
537
527
538
return url ;
528
- }
539
+ } ,
540
+ wrapX : source . wrapX || true
529
541
} ) ;
530
542
break ;
531
543
case 'TileImage' :
@@ -545,7 +557,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
545
557
. replace ( '{x}' , x . toString ( ) )
546
558
. replace ( '{y}' , y . toString ( ) ) ;
547
559
return url ;
548
- }
560
+ } ,
561
+ wrapX : source . wrapX || true
549
562
} ) ;
550
563
break ;
551
564
case 'KML' :
@@ -563,7 +576,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
563
576
return ;
564
577
}
565
578
oSource = new ol . source . Stamen ( {
566
- layer : source . layer
579
+ layer : source . layer ,
580
+ wrapX : source . wrapX || true
567
581
} ) ;
568
582
break ;
569
583
case 'ImageStatic' :
@@ -591,7 +605,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
591
605
minZoom : source . minZoom ,
592
606
maxZoom : source . maxZoom ,
593
607
projection : source . projection ,
594
- tileUrlFunction : source . tileUrlFunction
608
+ tileUrlFunction : source . tileUrlFunction ,
609
+ wrapX : source . wrapX || true
595
610
} ) ;
596
611
break ;
597
612
case 'Zoomify' :
@@ -600,7 +615,8 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
600
615
}
601
616
oSource = new ol . source . Zoomify ( {
602
617
url : source . url ,
603
- size : source . imageSize
618
+ size : source . imageSize ,
619
+ wrapX : source . wrapX || true
604
620
} ) ;
605
621
break ;
606
622
}
0 commit comments