Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

layers only wrap where flag is present #110

Benjamina338612de24c
diff --git a/web/js/map/wv.map.layerbuilder.js b/web/js/map/wv.map.layerbuilder.js
index 4d1ca4675..33d12b107 100644
--- a/web/js/map/wv.map.layerbuilder.js
+++ b/web/js/map/wv.map.layerbuilder.js
@@ -1,3 +1,16 @@
+/*
+ * NASA Worldview
+ *
+ * This code was originally developed at NASA/Goddard Space Flight Center for
+ * the Earth Science Data and Information System (ESDIS) project.
+ *
+ * Copyright (C) 2013 - 2014 United States Government as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ * All Rights Reserved.
+ */
+var wv = wv || {};
+wv.map = wv.map || {};
+
/*
* @Class
*/
@@ -27,7 +40,7 @@ wv.map.layerbuilder = wv.map.layerbuilder || function(models, config, cache) {
_.merge(def, def.projections[proj.id]);
if ( def.type === "wmts" ) {
layer = createLayerWMTS(def, options);
- if(proj.id === 'geographic') {
+ if(proj.id === 'geographic' && def.wraps === true) {
layerNext = createLayerWMTS(def, options, 1);
layerPrior = createLayerWMTS(def, options, -1);
layer = new ol.layer.Group({
@@ -37,7 +50,7 @@ wv.map.layerbuilder = wv.map.layerbuilder || function(models, config, cache) {
} else if ( def.type === "wms" ) {
layer = createLayerWMS(def, options);
- if(proj.id === 'geographic') {
+ if(proj.id === 'geographic' && def.wraps === true) {
layerNext = createLayerWMS(def, options, 1);
layerPrior = createLayerWMS(def, options, -1);