mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
Fix source filtering at low zooms to include global sources
This commit is contained in:
@@ -51,6 +51,8 @@ export function rendererBackground(context) {
|
||||
// Features resolved from loco should have area precalculated.
|
||||
source.area = feature.properties.area || Infinity;
|
||||
|
||||
// Flag if this is a "global" source
|
||||
source.isGlobal = feature.id === 'Q2';
|
||||
|
||||
// Instantiate a `rendererBackgroundSource`
|
||||
let background;
|
||||
@@ -283,7 +285,7 @@ export function rendererBackground(context) {
|
||||
|
||||
return _imageryIndex.backgrounds.filter(source => {
|
||||
if (includeCurrent && currSource === source) return true; // optionally include the current imagery
|
||||
if (zoom && zoom < 6) return false; // optionally exclude local imagery at low zooms
|
||||
if (zoom && zoom < 6) return source.isGlobal; // optionally exclude local imagery at low zooms
|
||||
return visible[source.id]; // include imagery visible in given extent
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user