always detect source type for custom background sources.

fixes #8057
This commit is contained in:
Martin Raifer
2021-11-23 15:03:37 +01:00
parent 770a43bd08
commit f6cbc65cdc
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ export function rendererBackgroundSource(data) {
// Guess a type based on the tokens present in the template
// (This is for 'custom' source, where we don't know)
if (!source.type) {
if (!source.type || source.id === 'custom') {
if (/SERVICE=WMS|\{(proj|wkid|bbox)\}/.test(_template)) {
source.type = 'wms';
source.projection = 'EPSG:3857'; // guess