[marble] [Bug 358779] dgml is missing an option center the map (lonlat) [patch]

Torsten Rahn bugzilla_noreply at kde.org
Sat Apr 22 14:02:07 BST 2023


https://bugs.kde.org/show_bug.cgi?id=358779

--- Comment #3 from Torsten Rahn <rahn at kde.org> ---
My need for this patch arises from the usecase of creating WMS-based
dgml-themes. Many WMS services just cover a particular geodetic bounding box
(and many are only meant as an overlay to be used for "groundlayers").

Now there are two issues in this context which I currently consider:
- Ideally instead of "centerOn" I'd like to rather see
"setViewLatLon(Alt)Box()" which would also steer the zoomlevel to ensure that a
particular region gets centered and fully displayed. The case where the map
should only be centered could be accomplished by using the same API with a
boundingbox that has no size (and is a point).
- In the implementation of the patch the centering is done whenever the map
theme changes if the map theme specifies a center-point. I'm not sure whether
this is a good approach. During application startup we have the option to
either center on the "home position" or to recall zoom level and center point
last time when Marble was quit. Also we usually don't change the view when a
map theme is changed.

I see several other usecases where one might want a different behavior:
- The centerOn/setViewLatLonAltBox would only get applied the first time the
map theme gets invoked (however that is impossible to detect at the moment).
- The centerOn/setViewLatLonAltBox would only get applied if the current point
that Marble focuses on is not in the valid boundingbox specified for the map
theme.  
- Or as this patch does we always enforce centerOn/setViewLatLonAltBox whenever
the map theme is invoked. Of course we could add an option that would override
this behavior (globally or restricted to this map theme) but that would make
things increasingly complex.

Tough choice :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Marble-bugs mailing list