[OpenLayers-Users] Using OpenLayers against ArcGIS Server WMS

Eamonn Doyle doyleeamonn at hotmail.com
Thu Mar 27 12:01:06 EDT 2008


Hi All,

I'm looking for advice on using an ArcGIS Server WMS against a base layer in Spherical Mercator. 

I'm using a modification of the spherical mercator example as per below. Specifically I'm having difficulty in understanding how to have OpenLayers request map images from the WMS using a EPSG that ArcGIS Server understands. I'm using ArcGIS Server 9.3 beta which includes support for spherical mercator using EPSG:102113. However the sample below creates getmap requests with EPSG:900913 which result in an invalid SRS message from the WMS. Can anyone advise as to whether I can have OpenLayers request the WMS in EPSG:102113 so that they overlay on MultiMap, Google etc?

Many Thanks

Eamonn

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <style type="text/css">
        #map {
            width: 100%;
            height: 512px;
            border: 1px solid gray;
        }
    </style>


    <script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script>

            <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript">
 
        var map, ve, merc, vector;

        function init(){
            var options = {
                projection: "EPSG:900913",
                units: "m",
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-1089992, 7141630,
                                                 -402058, 7454716)
            };
            map = new OpenLayers.Map('map', options);

            ve = new OpenLayers.Layer.MultiMap(
                "multimap",
                {'sphericalMercator': true}
            ); 
            merc = new OpenLayers.Layer.WMS("Rivers Agency",
                                            "http://faramir/arcgis/services/RiversAgency/MapServer/WMSServer",
                                            {'layers': '0,1',
                                             srs: 'EPSG:102113',
                                             'format':'png'},
                                            {'reproject': false,
                                             'opacity': 0.4,
                                             'isBaseLayer': false});
            // create a vector layer for drawing
            vector = new OpenLayers.Layer.Vector("Editable Vectors");
            
            map.addLayers([ve, merc, vector]);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addControl(new OpenLayers.Control.EditingToolbar(vector));
            map.zoomToMaxExtent()
        }
        
    </script>
  </head>
  <body onload="init()">
    <h3>OpenLayers MultiMap Mercator Example</h3>
    <div id="map"></div>
  </body>
</html>





_________________________________________________________________
Messenger likes to chat, one on one..or to everyone! Welcome to the Family – Download the Windows Live Messenger now
http://get.live.com/mail/overview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080327/2feaabe3/attachment.html


More information about the Users mailing list