Testcase:
https://fbinter.stadt-berlin.de/fb/wms/senstadt/k_luftbild2011_20?LAYERS=0&STYLES=default&FORMAT=image/png&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMapRequest URL: https://fbinter.stadt-berlin.de/fb/wms/senstadt/k_luftbild2011_20?LAYERS=0&STYLES=default&FORMAT=image/png&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap
Request Method: GET
Status Code: 400
JS Error says:
k_luftbild2011_20:1 GET https://fbinter.stadt-berlin.de/fb/wms/senstadt/k_luftbild2011_20?LAYERS=0&STYLES=default&FORMAT=image/png&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap 400
Same for this URL https://isk.geobasis-bb.de/mapproxy/dgm/service/wms?FORMAT=image/jpeg&TRANSPARENT=TRUE&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=dgm&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}, but with an error 500.
It looks like, the variables are not replaced in the URL.
I looked into this some more. The error changed since I reported it. The {vars} are now replaced (again).
Nevertheless, there seems to be a problem with the projection. I will open another Issue for this, since its a different problem.
@tordans Did you test both times on osm.org? We haven't changed anything there within that time frame so I'm not sure why this wouldn't work sometimes.
I looked at it again @quincylvania and you are right, I might have been looking at the different versions.
This does work:
https://www.openstreetmap.org/edit#background=custom:https://isk.geobasis-bb.de/ows/dop20c_wms%3FFORMAT%3Dimage/png%26TRANSPARENT%3DTRUE%26VERSION%3D1.1.1%26SERVICE%3DWMS%26REQUEST%3DGetMap%26LAYERS%3Dbebb_dop20c%26STYLES%3D%26SRS%3D{proj}%26WIDTH%3D{width}%26HEIGHT%3D{height}%26BBOX%3D{bbox}&disable_features=boundaries&map=18.60/52.41051/12.54939
This does _not_ work:
https://ideditor.netlify.app/#background=custom:https://isk.geobasis-bb.de/ows/dop20c_wms%3FFORMAT%3Dimage/png%26TRANSPARENT%3DTRUE%26VERSION%3D1.1.1%26SERVICE%3DWMS%26REQUEST%3DGetMap%26LAYERS%3Dbebb_dop20c%26STYLES%3D%26SRS%3D{proj}%26WIDTH%3D{width}%26HEIGHT%3D{height}%26BBOX%3D{bbox}&disable_features=boundaries&map=18.60/52.41051/12.54939
Error:
GET https://isk.geobasis-bb.de/ows/dop20c_wms?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=bebb_dop20c&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox} 500 (Internal Server Error)
@tordans I just checked both links and they appear to be working fine in Chrome, Firefox, and Safari, so I'm not sure what the issue is.
@quincylvania you are right, the error does not show up for anymore :-/. Will reopen once I have ne info …
I'm having something similar to this. I'm not sure if I should open this or open my own ticket, but I figured I'd try here first and see if it's the right place. I _think_ the problem is when I switch from a custom layer that uses {zoom}/{y}/{x} to one that uses {bbox} and or switch back. And then it works after a reload, so it feels inconsistent.
Browser: Vivaldi 3.5.2115.81 (based on Chromium 87) on Linux Lubuntu 20.04
Using openstreetmap.org default editor.
Here are steps that seem to consistently reproduce the problem for me:
https://tiles.arcgis.com/tiles/hGdibHYSPO59RG1h/arcgis/rest/services/MassGISBasemap/MapServer/tile/{zoom}/{y}/{x}https://gisprpxy.itd.state.ma.us/arcgisserver/rest/services/AGOL/Massachusetts_Water_Features/MapServer/export?bbox={bbox}&size={width},{height}&format=svg&f=imageSwitching between different {zoom}/{y}/{x} based layers seems to work, and switching between different {bbox} based ones seems to work, but switching between the types seems to break the variable substitution until I refresh the page.
but switching between the types seems to break the variable substitution until I refresh the page.
That would actually explain why I could not figure out my issue above :-). Its even harder to debug / understand since https://github.com/openstreetmap/iD/issues/8114 prevents the preservation of the currently selected layer on relaod. So to make the description complete, I would add
but switching between the types seems to break the variable substitution until I refresh the page and re-select the custom background (which still holds the previous input).