Changeset 493
- Timestamp:
- 06/01/06 07:54:31 (3 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Layer/Grid.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/WFS.js (modified) (3 diffs)
- trunk/openlayers/lib/OpenLayers/Layer/WMS.js (modified) (3 diffs)
- trunk/openlayers/tests/test_Layer_WMS.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Layer/Grid.js
r465 r493 221 221 getFullRequestString:function(params) { 222 222 var requestString = ""; 223 this.params. srs= this.projection;223 this.params.SRS = this.projection; 224 224 // concat tile params with layer params and convert to string 225 225 var allParams = Object.extend(params, this.params); trunk/openlayers/lib/OpenLayers/Layer/WFS.js
r471 r493 32 32 var newArguments = new Array(); 33 33 if (arguments.length > 0) { 34 //uppercase params 35 params = OpenLayers.Util.upperCaseObject(params); 34 36 newArguments.push(name, url, params); 35 37 } … … 38 40 39 41 if (arguments.length > 0) { 40 OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS); 42 OpenLayers.Util.applyDefaults( 43 this.params, 44 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 45 ); 41 46 } 42 47 }, … … 79 84 addTile:function(bounds, position) { 80 85 url = this.getFullRequestString( 81 { bbox:bounds.toBBOX() });86 { BBOX:bounds.toBBOX() }); 82 87 var tile = new OpenLayers.Tile.WFS(this, position, bounds, 83 88 url, this.tileSize); trunk/openlayers/lib/OpenLayers/Layer/WMS.js
r492 r493 26 26 var newArguments = new Array(); 27 27 if (arguments.length > 0) { 28 //uppercase params 29 params = OpenLayers.Util.upperCaseObject(params); 28 30 newArguments.push(name, url, params); 29 31 } … … 31 33 32 34 if (arguments.length > 0) { 33 OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS); 35 OpenLayers.Util.applyDefaults( 36 this.params, 37 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 38 ); 34 39 } 35 40 }, … … 63 68 addTile:function(bounds,position) { 64 69 url = this.getFullRequestString( 65 { bbox:bounds.toBBOX(),66 width:this.tileSize.w,67 height:this.tileSize.h});70 {BBOX:bounds.toBBOX(), 71 WIDTH:this.tileSize.w, 72 HEIGHT:this.tileSize.h}); 68 73 var tile = new OpenLayers.Tile.Image(this, position, bounds, 69 74 url, this.tileSize); trunk/openlayers/tests/test_Layer_WMS.html
r315 r493 13 13 t.eq( layer.name, "Test Layer", "layer.name is correct" ); 14 14 t.eq( layer.url, "http://octo.metacarta.com/cgi-bin/mapserv", "layer.url is correct" ); 15 t.eq( layer.params. map, "/mapdata/vmap_wms.map", "layer.params.map is correct" );16 t.eq( layer.params. format, "image/png", "layer.params.format is correctly overridden" );17 t.eq( layer.params. exceptions, "application/vnd.ogc.se_inimage",15 t.eq( layer.params.MAP, "/mapdata/vmap_wms.map", "layer.params.map is correct" ); 16 t.eq( layer.params.FORMAT, "image/png", "layer.params.format is correctly overridden" ); 17 t.eq( layer.params.EXCEPTIONS, "application/vnd.ogc.se_inimage", 18 18 "other default layer.params are set correctly" ); 19 19 } … … 25 25 var pixel = new OpenLayers.Pixel(5,6); 26 26 var tile = layer.addTile(new OpenLayers.Bounds(1,2,3,4), pixel); 27 t.eq( tile.img.src, "http://octo.metacarta.com/cgi-bin/mapserv? bbox=1,2,3,4&width=256&height=256&map=/mapdata/vmap_wms.map&layers=basic&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&styles=&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:4326", "image src is created correctly via addtile" );27 t.eq( tile.img.src, "http://octo.metacarta.com/cgi-bin/mapserv?BBOX=1,2,3,4&WIDTH=256&HEIGHT=256&MAP=/mapdata/vmap_wms.map&LAYERS=basic&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326", "image src is created correctly via addtile" ); 28 28 t.eq( tile.img.style.top, "6px", "image top is set correctly via addtile" ); 29 29 t.eq( tile.img.style.left, "5px", "image top is set correctly via addtile" ); … … 32 32 else 33 33 t.ok( layer.div.firstChild instanceof HTMLImageElement, "div first child is an image object" ); 34 t.eq( layer.div.firstChild.src, "http://octo.metacarta.com/cgi-bin/mapserv? bbox=1,2,3,4&width=256&height=256&map=/mapdata/vmap_wms.map&layers=basic&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&styles=&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:4326", "div first child is correct image object" );34 t.eq( layer.div.firstChild.src, "http://octo.metacarta.com/cgi-bin/mapserv?BBOX=1,2,3,4&WIDTH=256&HEIGHT=256&MAP=/mapdata/vmap_wms.map&LAYERS=basic&FORMAT=image/jpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326", "div first child is correct image object" ); 35 35 var pos = tile.getPosition(); 36 36 t.eq( pos.toString(), "x=5,y=6", "Position of tile is set correctly." );
