prefer tms sources over wms if duplicates exist with same name

This commit is contained in:
Martin Raifer
2018-03-05 23:21:03 +01:00
parent 837b297ec6
commit 5534f1edc5
+3
View File
@@ -59,6 +59,9 @@ sources.concat(whitelist).forEach(function(source) {
})
});
if (source.type === 'wms' && supportedProjection === undefined) return;
if (source.type === 'wms' && sources.some(function(otherSource) {
return otherSource.name === source.name && otherSource.type !== source.type;
})) return;
var im = {
id: source.id,