MarcusWolschon / osmeditor4android

Vespucci is a OpenStreetMap editor for Android

Home Page:http://vespucci.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Edit layer entry" does not store or remember tile width/height, resets to 512

crackwitz opened this issue · comments

Vespucci Version

19.3.5

Download source

Google Play Store

Device (Manufacturer and Model)

Google Pixel 4a

Android Version

13

Behaviour/Symptoms

I tried to add a custom background layer (WMS style URLs). I tried to set tile size to 256 but Vespucci requests tiles sized 512, even if I try to correct that. If I hardcode 256 into the URL, vespucci fetches those tiles and then shows them at half size, i.e. not covering.

NB: I noticed a similar issue with min and max levels.

Expected Behaviour

Vespucci's "Edit layer entry" dialog should store/remember the width and height.

How to recreate

  • Layers, Add, Add custom imagery...
  • Pick any WMS URL, set width and height to 256.
  • When Vespucci fetches the tile, it'll revert to 512 size. If 256 is hardcoded into the URL, Vespucci will scale the tiles incorrectly, assuming they-re sized 512 when they are sized 256 (from the hardcoding).

Crash dump submitted (no or yes + date)

No crash.

Any other potentially relevant information

Thanks for the report, the issue may already have been fixed in version 20, I'll check in the morning.

So, gave it a look. We currently overwrite the tile size value if the the projection is a EPSG:3857 (aka web mercartor) compatible one. IIRC this goes back to the initial support of WMS servers were I considered it prudent to use a larger tile size for efficiency reasons (as back then we didn't support EPSG:4326 that was essentially a flag that this was a WMS server entry).

Ah, understandable. I'm considering 256x256 because that's the standard size in the iD editor on my desktop computer. I got some explicit caching set up (the WMS sets Expires: ...1900..., so there's effort involved in making that cachable) and thought I could reuse my reverse proxy and its filled cache in Vespucci.

Its a hack that has outlived its useful life time. I'll replace it with a one time tip that WMS servers do support larger tile sizes and leave it at that.

Can you detail the issue you had with min/max zoom, can't replicate that right now.