Default the buffer to 0 instead of 2. On small maps (or fullscreen
maps on small devices) this is a huge win: instead of downloading *42 tiles* on a 500x500 div, we now download just 12, a 3.5x savings in downloads by default. The buffer of 2 was originally chosen when most maps were based on slow-loading WMS laeyrs and having an area to pan into was more important. That default no longer makes sense. (Closes #3111) r=tschaub git-svn-id: http://svn.openlayers.org/trunk/openlayers@11481 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
t.plan(1);
|
||||
m = new OpenLayers.Map("map", {'maxExtent':new OpenLayers.Bounds(-122.6579,37.4901,-122.0738,37.8795)});
|
||||
layer = new OpenLayers.Layer.TMS( "TMS",
|
||||
"http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png', resolutions:[0.000634956337608418]} );
|
||||
"http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png', resolutions:[0.000634956337608418], buffer: 2} );
|
||||
m.addLayer(layer);
|
||||
m.zoomToMaxExtent();
|
||||
t.eq(layer.getURL(layer.grid[3][3].bounds), "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/0/1/1.png", "TMS tiles around rounded properly.");
|
||||
|
||||
Reference in New Issue
Block a user