[OpenLayers-Users] "srs" contains unacceptable value with WMS from ARCGIS server

Francesco Pennica f.pennica at gmail.com
Wed Feb 10 05:34:05 EST 2010


I had the same problem; a simple way is to force OL to send the request with
"EPSG:102113" instead of "EPSG:900913", so you can either modify the
"getFullRequestString" function in OpenLayers.Layer.WMS class or override
it. I used this override with Ext JS and added a boolean option in the layer
definition (ags = true) to distinguish between arcgis server wms and
'regular' wms

Ext.override(OpenLayers.Layer.WMS, {
    getFullRequestString:function(newParams, altUrl) {
        var projectionCode = this.map.getProjection();
        if((projectionCode == 'EPSG:900913') && (this.ags)) {
            this.params.SRS = 'EPSG:102113';
        } else {
            this.params.SRS = (projectionCode == "none") ? null :
projectionCode;
        }

        return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(
                                                    this, arguments);
    }
});

Just a suggestion, but it works for me.


2010/2/10 Phil Scadden <p.scadden at gns.cri.nz>

> Trying to combine layer from Arcgis WMS service with google and I get
> the above. In arc, the resource is in ESPG:102113 which is apparently
> the same as 900913. Arcgis 9.4 will support the official ESPG:3785 but
> no way to force a 900913. So can I fudge this somehow on the openlayers
> end? I want to use Arcgis server rather geoserver etc (also available)
> because I have a lot of features crossing 180 degree line and others are
> too stupid to handle this.
>
> --
> Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
> Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
>
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose the
> contents.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/4a72d154/attachment.html


More information about the Users mailing list