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:
crschmidt
2011-02-25 11:50:30 +00:00
parent f7fcb86ee9
commit 339d1ebaef
10 changed files with 24 additions and 21 deletions
+4 -4
View File
@@ -130,7 +130,7 @@
t.plan( 3 );
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
layer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true,encodeBBOX:true});
layer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true,encodeBBOX:true, buffer: 2});
var m = new OpenLayers.Map('map');
m.addLayer(layer);
m.zoomToMaxExtent();
@@ -146,7 +146,7 @@
var layer = new OpenLayers.Layer.KaMap( "Blue Marble NG",
"http://www.openlayers.org/world/index.php",
{g: "satellite", map: "world"},
{wrapDateLine: true} );
{wrapDateLine: true, buffer: 2} );
var m = new OpenLayers.Map('map');
m.addLayer(layer);
m.zoomToMaxExtent();
@@ -158,13 +158,13 @@
function test_Layer_WrapDateLine_WMS_Overlay (t) {
t.plan( 3 );
var url = "http://octo.metacarta.com/cgi-bin/mapserv";
baselayer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true});
baselayer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true, buffer: 2});
var layer = new OpenLayers.Layer.WMS( "DM Solutions Demo",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true", format: "image/png"},
{wrapDateLine: true, reproject: false,encodeBBOX:true});
{wrapDateLine: true, reproject: false,encodeBBOX:true, buffer:2});
var m = new OpenLayers.Map('map');
m.addLayers([baselayer,layer]);
m.zoomToMaxExtent();