mikey75/jmaps

Alternating host name prefixes

mikey75 opened this issue · 1 comments

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

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.