mikey75 / jmaps

Java Swing component to display and interact with web maps.
2 stars 1 forks source link

Alternating host name prefixes #7

Open mikey75 opened 1 year ago

mikey75 commented 1 year ago

Some map sources have configurable host prefixes for making requests across multiple servers. Like a.tiles.openstreetmap.org, b.tiles.openstreetmap.org etc. Make it available in jmaps.

Example template would be: http://[a|b|c|d].tileserver.example.org/tile/{x}/{y}/{z}.png and the [a|b|c|d] part is a set of hosts that should be plugged into url roundrobin or randomly

mikey75 commented 7 months ago

The host alternator is done on this branch. The work needed to be done is make tile downloader recognize multiple hosts and not try to get from multiple hosts when one of them is already provided the tile. Pretty trickey, might need to refactor tile downloader and cache.