mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix source filtering for 'custom' and 'none'
This commit is contained in:
@@ -284,8 +284,9 @@ export function rendererBackground(context) {
|
||||
const currSource = baseLayer.source();
|
||||
|
||||
return _imageryIndex.backgrounds.filter(source => {
|
||||
if (source.isGlobal) return true; // always include imagery with worldwide coverage
|
||||
if (includeCurrent && currSource === source) return true; // optionally include the current imagery
|
||||
if (zoom && zoom < 6) return source.isGlobal; // optionally exclude local imagery at low zooms
|
||||
if (zoom && zoom < 6) return false; // optionally exclude local imagery at low zooms
|
||||
return visible[source.id]; // include imagery visible in given extent
|
||||
});
|
||||
};
|
||||
|
||||
@@ -490,7 +490,7 @@ rendererBackgroundSource.Esri = function(data) {
|
||||
|
||||
|
||||
rendererBackgroundSource.None = function() {
|
||||
var source = rendererBackgroundSource({ id: 'none', template: '' });
|
||||
var source = rendererBackgroundSource({ id: 'none', template: '', isGlobal: true });
|
||||
|
||||
|
||||
source.name = function() {
|
||||
@@ -513,7 +513,7 @@ rendererBackgroundSource.None = function() {
|
||||
|
||||
|
||||
rendererBackgroundSource.Custom = function(template) {
|
||||
var source = rendererBackgroundSource({ id: 'custom', template: template });
|
||||
var source = rendererBackgroundSource({ id: 'custom', template: template, isGlobal: true });
|
||||
|
||||
|
||||
source.name = function() {
|
||||
|
||||
Reference in New Issue
Block a user