OpenLayers OpenLayers

Changeset 7415

Show
Ignore:
Timestamp:
06/21/08 09:27:16 (2 months ago)
Author:
crschmidt
Message:

SRS sent with WFS requests should match projection of requested extents.
(Closes #1537)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Layer/WFS.js

    r7362 r7415  
    434434     */ 
    435435    getFullRequestString:function(newParams, altUrl) { 
    436         var projectionCode = this.map.getProjection(); 
     436        var projectionCode = this.projection.getCode() || this.map.getProjection(); 
    437437        this.params.SRS = (projectionCode == "none") ? null : projectionCode; 
    438438 
  • trunk/openlayers/tests/Layer/WFS.html

    r6719 r7415  
    130130        map.destroy();      
    131131    } 
     132    function test_projection_srs(t) { 
     133        t.plan(1); 
     134        var map = new OpenLayers.Map('map'); 
     135        map.addLayer(new OpenLayers.Layer("",{isBaseLayer: true} )); 
     136        var layer = new OpenLayers.Layer.WFS("","",{},{'projection': new OpenLayers.Projection("EPSG:900913")}); 
     137        map.addLayer(layer); 
     138        map.zoomToMaxExtent(); 
     139        var params = OpenLayers.Util.getParameters(layer.getFullRequestString()); 
     140        t.eq(params.SRS, "EPSG:900913", "SRS represents projection of WFS layer, instead of map (#1537)");    
     141    } 
    132142 
    133143