As displays are now supporting incredibly high resolutions, this means that tons of server requests will be required to fill a single map view. For example, on my laptop with retina display, opening a single full screen map will result in about 48 individual tiles being requested simultaneously.
So, how to cope with this?
1. Tile Size
If you control the tile generation process a "simple" option will be to generate bigger tiles, hence reducing the number of requests. Bing Maps, for instance, supports setting different sizes for the tiles (reference).
var MM = Microsoft.Maps; var map = new MM.Map(document.getElementById("mapDiv"), { center: new MM.Location(45.0, 10), zoom: 5, credentials:"your key here"}); var tileSource = new MM.TileSource({ width: 512, height: 512, uriConstructor: function(tile) { return "images/square512.png"; }}); var tileLayer = new MM.TileLayer({ mercator: tileSource}); map.entities.push(tileLayer);In this particular case we're talking about 15 tiles being requested (albeit each one being bigger), which is a big difference from the previous 48.
2. Serve tiles from different urls
A technique called domain sharding can be also be used, on which different domains are used to fetch the same information, thus bypassing the "same-domain" browser limitation.
A good example of this can be seed on Bing Maps, as it's using this technique to speed up serving the tiles.
Taking a look at the web-traffic for the base tiles we can see 4 different hostnames being used:
- https://t0.ssl.ak.dynamic.tiles.virtualearth.net
- https://t1.ssl.ak.dynamic.tiles.virtualearth.net
- https://t2.ssl.ak.dynamic.tiles.virtualearth.net
- https://t3.ssl.ak.dynamic.tiles.virtualearth.net
The corresponding hostname is determined by the last digit of the quadkey that identifies the tile. For example, tile 0331 will use t1, tile 0330 will use t0, and so on.
Pedro'S Tech Mumblings: Improve Tile-Loading At The Browser >>>>> Download Now
ReplyDelete>>>>> Download Full
Pedro'S Tech Mumblings: Improve Tile-Loading At The Browser >>>>> Download LINK
>>>>> Download Now
Pedro'S Tech Mumblings: Improve Tile-Loading At The Browser >>>>> Download Full
>>>>> Download LINK gB