diff --git a/examples/utfgrid.html b/examples/utfgrid.html index e92c206dfb..4f9dd83064 100644 --- a/examples/utfgrid.html +++ b/examples/utfgrid.html @@ -127,7 +127,8 @@ var grid_layer = new OpenLayers.Layer.UTFGrid( 'Invisible UTFGrid Layer', - "./utfgrid/world_utfgrid/${z}/${x}/${y}.json" + "./utfgrid/world_utfgrid/${z}/${x}/${y}.json", + {utfgridResolution: 4} // default is 2 ); map.addLayer(grid_layer); diff --git a/examples/utfgrid_twogrids.html b/examples/utfgrid_twogrids.html index de3bf84ae2..67c1cab660 100644 --- a/examples/utfgrid_twogrids.html +++ b/examples/utfgrid_twogrids.html @@ -48,11 +48,13 @@ var world_utfgrid = new OpenLayers.Layer.UTFGrid( "World Population", - "./utfgrid/world_utfgrid/${z}/${x}/${y}.json" + "./utfgrid/world_utfgrid/${z}/${x}/${y}.json", + {utfgridResolution: 4} // default is 2 ); var bio_utfgrid = new OpenLayers.Layer.UTFGrid( "World Bioregions", - "./utfgrid/bio_utfgrid/${z}/${x}/${y}.json" + "./utfgrid/bio_utfgrid/${z}/${x}/${y}.json", + {utfgridResolution: 4} // default is 2 ); map.addLayers([bio_utfgrid,world_utfgrid]); diff --git a/lib/OpenLayers/Layer/UTFGrid.js b/lib/OpenLayers/Layer/UTFGrid.js index b34012b40d..09b4116d49 100644 --- a/lib/OpenLayers/Layer/UTFGrid.js +++ b/lib/OpenLayers/Layer/UTFGrid.js @@ -163,8 +163,8 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, { * APIProperty: utfgridResolution * {Number} * Ratio of the pixel width to the width of a UTFGrid data point. If an - * entry in the grid represents a 2x2 block of pixels, the - * utfgridResolution would be 2. Default is 4 (specified in + * entry in the grid represents a 4x4 block of pixels, the + * utfgridResolution would be 4. Default is 2 (specified in * ). */ diff --git a/lib/OpenLayers/Tile/UTFGrid.js b/lib/OpenLayers/Tile/UTFGrid.js index 1fed0ed46e..95a3600905 100644 --- a/lib/OpenLayers/Tile/UTFGrid.js +++ b/lib/OpenLayers/Tile/UTFGrid.js @@ -36,10 +36,10 @@ OpenLayers.Tile.UTFGrid = OpenLayers.Class(OpenLayers.Tile, { * Property: utfgridResolution * {Number} * Ratio of the pixel width to the width of a UTFGrid data point. If an - * entry in the grid represents a 2x2 block of pixels, the - * utfgridResolution would be 2. Default is 4. + * entry in the grid represents a 4x4 block of pixels, the + * utfgridResolution would be 4. Default is 2. */ - utfgridResolution: 4, + utfgridResolution: 2, /** * Property: json diff --git a/tests/Tile/UTFGrid.html b/tests/Tile/UTFGrid.html index c7fbdf8b88..723f8b9b8d 100644 --- a/tests/Tile/UTFGrid.html +++ b/tests/Tile/UTFGrid.html @@ -8,7 +8,7 @@ layer = new OpenLayers.Layer.UTFGrid( null, "../data/utfgrid/world_utfgrid/${z}/${x}/${y}.json", - {isBaseLayer: true} + {isBaseLayer: true, utfgridResolution: 4} ); map = new OpenLayers.Map({ div: "map",