WMS layer content is rendered with a white backdrop

Bartek Zoladkowski shared this problem 20 days ago
In Progress

Hi Team, not sure this exact issue was already covered, but a few existing i reviewed have nothing to do with this strange behavior.

BDL the service of Polish Forestry Service recently updated what/how they serve the layer information. The URL to the WMS remained the same, but instead of solid polygons, now they present just the contours in a style that matches how their web/apk maps show that layer.

https://mapserver.bdl.lasy.gov.pl/ArcGIS/services/WMS_BDL_Mapa_turystyczna/MapServer/WMSServer (i've added it to Locus library some years ago, the only difference i see, is they now advertise it with https://)

While in their Web and APK maps the layer in particular (Obszar Zanocuj w Lesie - areas where it is allowed to spend a night or two) is showing correctly, Locus unfortunately has a wierd issue of adding opaque white background to that layer. Luckily we have the visibility slider, and with ~25%-50% it's usable, but whole base map looks like extra opacity filter is applied.

Initially i contacted them, to inquiry what changes they did which could cause this. That was over a week ago, with no reply (in other cases they were fast and responsive) but since them i tried playing around with those layers using a browser and it seems like some strange issue with PNG transparency on Locus instead. Could it be the case?

Attaching some screenshots + png saved directly from arcgis map viewer https://www.arcgis.com/apps/mapviewer/index.html but it's the same when vising BDL original geoportal: https://www.bdl.lasy.gov.pl/portal/mapy?t=0&ll=17.574198,50.910188&scale=72224&map=8,1.0&layers=0,1,2,3,4,5,6,7,8,9,10,13,14,15,16&basemap=1&extwms=&hist= (or direct PNG https://mapserver.bdl.lasy.gov.pl/ArcGIS/rest/services/Mapa_turystyczna/MapServer/export?dpi=96&transparent=true&format=png8&bbox=1942563.4364594803%2C6594558.707572808%2C1970138.0944133205%2C6616285.93286284&bboxSR=102100&imageSR=102100&size=1443%2C1137&layers=show%3A1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C13%2C14%2C15%2C16&f=image)

1f3afd55eef62cb546e456ba5512ec3650683d70de8688084087be32aa40d3c7

+ rechecked using most recent beta (Friday 13th, no luck...)
+ attached wms service capabilities

Replies (5)

photo
1

Hmm... ok, when i change the format in that export URL... the resulting image of course has no transparency... if that's the problem then it's really silly 😅

But in this case, there are some historic topics already:
- https://help.locusmap.eu/topic/transparency_of_wms_layers

- https://help.locusmap.eu/topic/27650-wms-select-image-file-format


+ upon checking that WMS service capas, the image/bmp is listed first for GetMap requests. Again this would be silly, but seems realistic this could be what changed (list of those formats is not alphabetic)... unfortunately i never captured old capas to compare.

This comment is in trash! Restore
photo
2

Hi,

I'm testing this WMS and it works correctly to me, interesting.

If you are using Beta version, do you know how to enable logging to file (long click on the main menu button)? In the log (generated to the "app/logs" directory should be visible full url to the WMS service ... to verify the request. But I'm checking the logic and app should correctly request semi-transparent PNG file.

Sorry to leaving some investigation to you. Feel free to share the logs with me to analyze if needed.

This comment is in trash! Restore
photo
1

Ah... logs... 🫣 of course... no worries, somehow i haven't thought about it (instead i itched to jump into code directly)

I grabbed some, attached an excerpt from reinitialization of the map (i cleaned up cache too somewhere along the way).

However one thing that is painfully obvious is that the URLs contain `TRANSPARENT=FALSE` param. Changing this by hand makes all the difference!

http://mapserver.bdl.lasy.gov.pl/arcgis/services/WMS_BDL_Mapa_turystyczna/MapServer/WMSServer?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG%3A3857&FORMAT=image%2Fpng&LAYERS=0%2C3&STYLES=&TRANSPARENT=FALSE&BBOX=1956402.089185%2C6599511.536456%2C1961274.186946%2C6604384.519675&WIDTH=512&HEIGHT=512

But I don't see anything suggesting why the code decided on that, no relevant capabilities dumped, yet 'V' suggests it's already a verbose level.

This comment is in trash! Restore
photo
2

Hmm thanks ... I've double checked the code, and this should not happen at all. It looks like some coruption of map definiton file.
What if you tap on "re-initialize" in the three-dot menu of the WMS map? This should force map to reload it's configuration.

This comment is in trash! Restore
photo
1

I tried reinitialization and cache clearing before, so this did nothing now too.

HOWEVER - removing the map entierly and adding fresh using exact URL from their page (one with https:// this time) WORKED. Whatever the corruption of metadata could happened it must have happened when they changed the style/meta of their wms service.

1) While this is let's say solved... i sumbled upon another issue - after above successful attempt i wanted to check if it will aslo be fixed when i add this WMS from locus library again. The moment i open Add from library new activity with a search on top appears, the app force closed at first, but at next attempts it just initializes back to back screen on it's own. I hope a trace of that will be visible to you from the logs.

2) I noticed than even if i use https:// link to add that WMS, checking its details later on shows just http:// which is better in this scenario can be a matter of debate, but it's not consistent. I think if https:// works, then the app should just use what the user originally requested, right?

95a04671e27bf381a4d611da93ee72f1c9e0a49a3820762f1ee3e67d00cca2a6



bonus 3) Another thing is (and i hope i'm not going mad) the app decided on its own to change display language to Polish, even though in the settings English is still selected. Looking at screenshots from yesterday and today, it must have happened somewhere inbetween (because whether it's polish or english, its subconscious to understand either way without noticing the change).
Well from the logs i can see what texts the app uses for display, like "text: Working…" yesterday 17:33, then for some reason "text: Wykonuję…" at 18:45


18:45:04.255	D	c	setAppLangFromSystemIfChanged(), current: en_US, pref: null, localeSystem: en_US
18:45:04.283	D	b	requestLanguageResources(en_US), locale: en_US, installed: [], res: false
18:45:04.292	D	f	show(0), context: com.asamm.locus.basic.features.mainActivity.MainActivityMap@22a92cc, duration: SHORT, text: Wykonuję…
59b1ba88038f740efe192118991c160ac40032c912b54fcc5962963a71c7a7ac



hmm, i'll try reinstalling the app fresh then 🤷‍♂ sometimes exiting and reentering the car just works i guess... i'll create a separate Problem ticket if this persists then.

This comment is in trash! Restore
Leave a Comment
 
Attach a file