Exclude Locator Overlay from imagery_used

This commit is contained in:
John Firebaugh
2013-08-23 12:48:28 -07:00
parent 86d1baf00f
commit 77985d65f8
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -52,7 +52,10 @@ iD.Background = function(context) {
}
overlayLayers.forEach(function (d) {
imageryUsed.push(d.source().sourcetag || d.source().name);
var source = d.source();
if (!source.isLocatorOverlay()) {
imageryUsed.push(source.sourcetag || source.name);
}
});
if (background.showsGpxLayer()) {
+5 -1
View File
@@ -51,7 +51,11 @@ iD.BackgroundSource = function(data) {
source.validZoom = function(z) {
return source.scaleExtent[0] <= z &&
(source.name !== 'Locator Overlay' || source.scaleExtent[1] > z);
(!source.isLocatorOverlay() || source.scaleExtent[1] > z);
};
source.isLocatorOverlay = function() {
return source.name === 'Locator Overlay';
};
source.copyrightNotices = function() {};