Thanks Richard. That was it.

On Oct 15, 2011, at 4:25 PM, Richard Greenwood wrote:

> On Sat, Oct 15, 2011 at 2:36 PM, Puneet Kishor <[email protected]> wrote:
>> I am confounded by this basic problem, so instead of wasting any more time 
>> on it, I ask your help (at the risk it being a stupid question). My data are 
>> stored in EPSG:4326, and I am having MapServer pull it out with the 
>> following incantations
>> 
>>        MAP
>>        ..
>>                PROJECTION
>>                        "init=epsg:4326"
>>                        "init=epsg:900913"
>>                END
> 
> 
> Only one coordinate system may defined with the PROJECTION block. It
> doesn't matter which one you define if all of your layers also have a
> PROJECTION block
> 
> 
>>                WEB
>>                        METADATA
>>                                ows_enable_request "*"
>>                                wms_srs "EPSG:900913 EPSG:4326"
>>                        END
>>                END
>> 
>>                LAYER
>>                ..
>>                        NAME "lyr"
>>                        DATA "the_geom FROM table USING UNIQUE gid USING 
>> srid=4326"
>> 
>> 
>>                        PROJECTION
>>                                "init=epsg:4326"
>>                                "init=epsg:900913"
>>                        END
> 
> Within the LAYER, the PROJECTION block defines the coordinate system
> that the layer is in. So only one of the above can be correct.
> 
> 
>>                        METADATA
>>                                ows_enable_request "*"
>>                                wms_srs "EPSG:900913 EPSG:4326"
>>                        END
>> 
>> I am adding the layer to my map with
>> 
>>    map = new OpenLayers.Map("map", {
>>        projection: new OpenLayers.Projection("EPSG:900913"),
>>        displayProjection: new OpenLayers.Projection("EPSG:4326"),
>>        units: "dd",
>>        maxResolution: 156543.0339,
>>        maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 
>> 20037508)
>>    });
>> 
>>    var lyr = new OpenLayers.Layer.WMS(
>>        "lyr",
>>        "http://server/cgi-bin/app";,
>>        {layers: "lyr"},
>>        {isBaseLayer: false}
>>    );
>> 
>>    map.addLayers([lyr]);
>> 
>> Yet, I get the following error
>> 
>>        <ServiceException code="InvalidSRS">
>>        msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS 
>> must be valid for all requested layers.
>>        </ServiceException>
>> 
>> What am I doing wrong?
>> 
>> 
>> --
>> Puneet Kishor _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>> 
> 
> 
> 
> -- 
> Richard Greenwood
> [email protected]
> www.greenwoodmap.com

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to