Bug 489166 - Support ports for maps
Summary: Support ports for maps
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Debian unstable Linux
: NOR grave
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-25 10:05 UTC by Marcos Dione
Modified: 2024-07-12 14:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Dione 2024-06-25 10:05:17 UTC
SUMMARY

marble does not seem to support ports in URLs for new maps.

STEPS TO REPRODUCE
1. Create a new indexed tiles online map
2. Provide a URL with a port in it. In my example it's http://127.0.0.1:8000/{zoomLevel}/{x}/{y}.png 
3. Finish creating the map.

OBSERVED RESULT
The General Information (3rd) screen can fetch a preview image (tile 0/0/0), but the .dgml file does not include the port number in the service description:

                    <downloadUrl protocol="http" host="127.0.0.1" path="/{zoomLevel}/{x}/{y}.png" query=""/>

In the server's logs I can see the preview image being downloaded:

INFO:     127.0.0.1:53620 - "GET /0/0/0.png HTTP/1.1" 200 OK

The map does not render at all and there are no logs. Adding the port to the host or path does not fix it.

EXPECTED RESULT

The post is included in the downloadURL element and the map works.
Comment 1 Marcos Dione 2024-07-12 14:11:47 UTC
[15:55:54] <StyXman> I plan to try to fix https://bugs.kde.org/show_bug.cgi?id=489166 I have an invent.,kde.org account, but I'm not sure if I'm supposed to clone the repo in invent first and then clone locally, or clone locally directly and then push to the original repo
[16:01:04] <kbroulik[M]> <StyXman> "I plan to try to fix https://..." <- https://invent.kde.org/education/marble/-/blob/master/src/lib/marble/geodata/handlers/dgml/DgmlDownloadUrlTagHandler.cpp?ref_type=heads#L58 there’s some things about `port` in there but I don’t know marble or dgml much
[16:02:47] <StyXman> oh, right, so maybe my version is too ancient?
[16:03:19] <StyXman> hmm, 16ya, not _that_ ancient
[16:03:31] <StyXman> maybe the url parser is ignoring the port
[16:04:37] <kbroulik[M]> https://invent.kde.org/education/marble/-/blob/master/src/lib/marble/ServerLayout.cpp maybe there’s a bug in here somewhere
[16:06:27] <kbroulik[M]> https://invent.kde.org/education/marble/-/blob/master/src/lib/marble/geodata/writers/dgml/DgmlTextureTagWriter.cpp?ref_type=heads#L69 it should write a port to the dgml
[16:06:45] <kbroulik[M]> https://invent.kde.org/education/marble/-/commit/bfcd680f19d653369849e3e70b7f61e23eb1d73e ah! maybe your marble is too old after all? :)
[16:07:06] <kbroulik[M]> this was fixed in January 2023