feat: support multiple tile URL templates for flat tile maps - #11
Open
LonghiTW wants to merge 1 commit into
Open
feat: support multiple tile URL templates for flat tile maps#11LonghiTW wants to merge 1 commit into
LonghiTW wants to merge 1 commit into
Conversation
Zoriot
reviewed
Jul 27, 2026
LonghiTW
force-pushed
the
feature/multiple-tile-urls
branch
from
August 5, 2026 07:56
1859fe0 to
c0cb344
Compare
- tile_url now accepts either a single URL string or a list of URL strings - internally normalized to List<UrlOption> for compositing - FlatTileMapService composites all URL options in parallel, drawing in reverse order (later entries on top); per-URL failures are skipped - serialization keeps the single tile_url field (string for one URL, array for multiple); no separate tile_urls field remains
LonghiTW
force-pushed
the
feature/multiple-tile-urls
branch
from
August 5, 2026 08:08
c0cb344 to
5dbbb6c
Compare
Author
|
I've reworked the PR based on Zoriot's feedback: Single field, no dual-field supportYou were right that keeping tile_url + tile_urls long-term is a terrible idea — so the tile_urls field is gone entirely. tile_url now accepts either one URL string or a list of URL strings, normalized internally into a List: Existing configs keep working as-is, and serialization always writes back the single tile_url key (string for one source, array for multiple). All commits are signed. |
Zoriot
requested changes
Aug 9, 2026
| g.drawImage(img, 0, 0, null); | ||
| } | ||
| } catch (Exception e) { | ||
| // Ignore |
Collaborator
There was a problem hiding this comment.
Blindly ignoring the exception without any explanation is not so nice
| en_us: ["",{"text":"© ","color":"white"},{"text":"National Land Surveying and Mapping Center, Ministry of the Interior, ROC","underlined":true,"color":"aqua","clickEvent":{"action":"open_url","value":"https://maps.nlsc.gov.tw/"}}] | ||
| zh_tw: ["",{"text":"內政部國土測繪中心","underlined":true,"color":"aqua","clickEvent":{"action":"open_url","value":"https://maps.nlsc.gov.tw/"}},{"text":"版權所有 ©Copyright","color":"white"}] | ||
| tile_url: | ||
| - https://wmts.nlsc.gov.tw/wmts/LiDAR2024/default/GoogleMapsCompatible/{z}/{y}/{x}.png |
Collaborator
There was a problem hiding this comment.
Seems to not work at all.
Show log
[15:59:47] [Render thread/INFO]: [System] [CHAT] T+- » Teleported to 25.014052, 121.463778, 11.
[15:59:49] [Render thread/INFO]: [FANCYMENU] ScreenCustomizationLayer registered: pause_screen
[15:59:49] [Render thread/INFO]: Resized a dynamic immediate buffer to 160!
[15:59:49] [Render thread/INFO]: Resized a dynamic immediate buffer to 320!
[15:59:49] [Render thread/INFO]: Resized a dynamic immediate buffer to 640!
[15:59:49] [Render thread/INFO]: Resized a dynamic immediate buffer to 1280!
[15:59:50] [Render thread/INFO]: [FANCYMENU] ScreenCustomizationLayer registered: com.mndk.bteterrarenderer.mcconnector.client.gui.screen.AbstractGuiScreenImpl
[15:59:50] [terra++ disk I/O thread/INFO]: [STDOUT]: [2026/08/09 15:59:50:260] INFO [terra++ bootstrap] Cache miss: https://www.historygis.udd.gov.taipei/urban/assets/images/logo.svg
[15:59:53] [terra++ disk I/O thread/INFO]: [STDOUT]: [2026/08/09 15:59:53:507] INFO [terra++ bootstrap] Cache miss: https://maps.nlsc.gov.tw/images/entrance.gif
[15:59:54] [terra++ HTTP network thread/INFO]: [STDOUT]: [2026/08/09 15:59:54:808] INFO [terra++ bootstrap] Request succeeded: https://maps.nlsc.gov.tw/images/entrance.gif
[16:00:00] [terra++ HTTP network thread/INFO]: [STDOUT]: [2026/08/09 16:00:00:653] INFO [terra++ bootstrap] Request succeeded: https://www.historygis.udd.gov.taipei/urban/assets/images/logo.svg
[16:00:00] [ForkJoinPool.commonPool-worker-1/ERROR]: Error processing cache value
java.util.concurrent.CompletionException: java.lang.RuntimeException: com.mndk.bteterrarenderer.dep.batik.transcoder.TranscoderException: null
Enclosed Exception:
null:0
The URI "data:image/png;base64,
<printed data of the file>
on element <image> can't be opened because:
URL data in unsupported format or corrupt
at knot//com.mndk.bteterrarenderer.dep.batik.bridge.UserAgentAdapter.getBrokenLinkDocument(UserAgentAdapter.java:448)
Collaborator
There was a problem hiding this comment.
Tests are failing for me.
Show log
Can not write a field name, expecting a value
com.fasterxml.jackson.core.JsonGenerationException: Can not write a field name, expecting a value
at com.fasterxml.jackson.core.JsonGenerator._reportError(JsonGenerator.java:2733)
at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.writeFieldName(WriterBasedJsonGenerator.java:153)
at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:2407)
at com.mndk.bteterrarenderer.core.tile.TileMapServiceCommonProperties.write(TileMapServiceCommonProperties.java:102)
at com.mndk.bteterrarenderer.core.tile.TileMapServiceCommonPropertiesTest.writeJson(TileMapServiceCommonPropertiesTest.java:72)
at com.mndk.bteterrarenderer.core.tile.TileMapServiceCommonPropertiesTest.givenMultipleTileUrls_whenWriteCalled_thenWrittenAsArray(TileMapServiceCommonPropertiesTest.java:64)
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.
Add support for 'tile_urls' field in flat tile map services, allowing a single map layer to consist of multiple tile URL sources that are fetched and composited together.