Add built-in XYZ tile store (map.type = xyz)#201
Open
comoglu wants to merge 1 commit into
Open
Conversation
Add an XYZ / slippy-map tile store to the GUI map library so SeisComP GUIs
can use basemaps from any standard XYZ server (OpenStreetMap, OpenTopoMap,
ESRI, CartoDB, custom) out of the box, without an external plugin.
- Implemented privately in an anonymous namespace in
libs/seiscomp/gui/map/tilestores/xyz.cpp; no public header, so adding
members later does not affect the library ABI. Registers itself with the
TileStore factory as "xyz".
- Features: per-zoom-level source bands (map.xyz.sources), single-source
min/maxLevel, on-disk caching with TTL, negative-caching of HTTP>=400
tiles (map.xyz.missingTTL), {s} subdomain rotation, 256/512 tile size.
- Link Qt Network into the gui library; document map.xyz.* in global_gui.xml.
22cca92 to
da3abfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an XYZ / slippy-map tile store to the GUI map library so SeisComP GUIs (scolv, scmv, scmvx, scesv, scmapcut, …) can use basemaps from any standard XYZ tile server — OpenStreetMap, OpenTopoMap, ESRI World Imagery, CartoDB, or a custom server — out of the box, selected with
map.type = xyz. Previously the only built-in store was the file-basedTileDirectory.This follows Jan's guidance: implemented inside the GUI library, privately (anonymous namespace, no public header) so it isn't part of the API and adding members later doesn't affect the library ABI. It registers itself with the
TileStorefactory as"xyz".What's included
libs/seiscomp/gui/map/tilestores/xyz.cpp— the implementation, plus itsCMakeLists.txt, wired into the gui lib viaSC_ADD_GUI_SUBDIR_SOURCES(GUI_MAP tilestores).map.xyz.*documented inapps/gui/descriptions/global_gui.xml, and themap.typedescription updated to mention the built-inxyzstore.Features
map.xyz.sources— list ofminLevel:maxLevel:urlTemplatebands, so different basemaps can be shown at different zoom levels (overridesmap.location).map.xyz.minLevel/maxLevel— single-source zoom clamp (default max 19 = OSM standard; hard ceilingTileIndex::MaxLevel).map.xyz.cacheDir/cacheDuration).map.xyz.missingTTL) so absent tiles aren't re-requested every redraw.{s}subdomain rotation and 256/512 tile size (with a one-time warning if the served size differs).URL template tokens:
{z}/{x}/{y}/{s}(note ESRI uses{z}/{y}/{x}order).Notes
TileDirectory(_projection = Mercator).Q_OBJECT/moc: replies are dispatched via the functor-basedconnectoverload, keeping the implementation header-free.libseiscomp_qt(verified locally, Qt5). An external standalone plugin remains available for SeisComP < 7.