OpenLayers/FasterTiles
Jump to navigation
Jump to search
OpenLayers has the ability to load from multiple tile servers URLs at once. Since browsers limit concurrent requests based on hostname, this means that by configuring additional hostnames, the browser will load more tiles simulatneously, resulting in a faster load time.
To set this up:
- Set up multiple DNS aliases for the same content. It may make sense to simply set up a wildcard DNS name for tile loading, a la *.tile.openstreetmap.org
- Change the OpenLayers.Layer creation to use multiple URLs:
- Layer.TMS("Name", ['http://tile1.tile.openstreetmap.org/tiles/', 'http://tile2.tile.openstreetmap.org/tiles/'], {'layername':'mapnik'})
- Watch as tiles load more quickly!