Different SRS in WMS/Basemap layers?

3598
6
03-14-2012 08:15 AM
JörgPossin
New Contributor III
Hi all,

I read a lot of threads in this forum and it seems that it is not possible to combine a ArcGIS Basemap and a WMS if the SRS don't match (http://forums.arcgis.com/threads/40478-How-to-add-WMS-in-flexviewer-basemaps?p=138193&viewfull=1#pos... and http://forums.arcgis.com/threads/49500-WMS-skipgetcapabilities-bug-in-flexviewer-2.2?p=170743&viewfu.... Is that right?

I want something like this:

srs= new SpatialReference(4326); //WGS84
map = new Map();
   
extent = new Extent(5.81429, 50.32778, 9.22005, 52.539, srs); 
map.extent = extent;

var wmslayers:ArrayList = new ArrayList();
wmslayers.addItem("Naturraeumliche_Haupteinheiten");
wmsmap = new com.esri.ags.layers.WMSLayer("http://www.wms.nrw.de/umwelt/linfos");
wmsmap.initialExtent =  extent;
wmsmap.spatialReference = srs;
wmsmap.visible = true;
wmsmap.visibleLayers = wmslayers;
map.addLayer(wmsmap);
      
streetmap = new ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
streetmap.visible=true;
map.addLayer(streetmap);


The ESRI ArcGIS API can't reproject between different SRS?

regards,
Jörg
Tags (2)
0 Kudos
6 Replies
DasaPaddock
Esri Regular Contributor
Yes, you need to find a SRS that's supported by all the layers in your map.

This WMS service seems to only support these projections:

    <SRS>EPSG:31466</SRS>
    <SRS>EPSG:3034</SRS>
    <SRS>EPSG:3035</SRS>
    <SRS>EPSG:3043</SRS>
    <SRS>EPSG:3044</SRS>
    <SRS>EPSG:3045</SRS>
    <SRS>EPSG:4258</SRS>
    <SRS>EPSG:4326</SRS>
    <SRS>EPSG:25831</SRS>
    <SRS>EPSG:25832</SRS>
    <SRS>EPSG:25833</SRS>
    <SRS>EPSG:28992</SRS>
    <SRS>EPSG:31467</SRS>

The base map layer, http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer, is cached at 102100 (3857) which isn't supported by the WMS service. If you use a different layer that supports 4326, then you can use them both like this:

    <esri:Map>
        <esri:extent>
            <esri:Extent xmin="5.8" ymin="50.3" xmax="9.2" ymax="52.5">
                <esri:SpatialReference wkid="4326"/>
            </esri:Extent>
        </esri:extent>
        <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
        <esri:WMSLayer skipGetCapabilities="true"
                       url="http://www.wms.nrw.de/umwelt/linfos"
                       version="1.1.1">
            <esri:visibleLayers>
                <s:ArrayList>
                    <fx:String>Naturraeumliche_Haupteinheiten</fx:String>
                </s:ArrayList>
            </esri:visibleLayers>
        </esri:WMSLayer>
    </esri:Map>
0 Kudos
JörgPossin
New Contributor III
Thanks dpaddock for your answer,

it helps me but is there a possibility to use ArcGIS Server as a "proxy wms" to reproject another wms which doesn't support particular srs?

Jörg
0 Kudos
HeatherGonzago
Esri Contributor
So I guess the question would be exactly what are you referring to when you state "proxy wms?" Do you mean use ArcGIS Server to reproject the original WMS service? Are you talking about creating a WMS service through ArcGIS Server using it's WMS capabilities?
0 Kudos
JörgPossin
New Contributor III
Yes, I mean to reproject an WMS through the ArcGIS Server. I don't want to create an wms with my own data with our ArcGIS Server.
0 Kudos
HeatherGonzago
Esri Contributor
Hi - sorry for the delay, to answer your question, unfortunately...no you cannot use ArcGIS Server to reproject your existing WMS layer info to something else. There are methods in Server to allow reprojection of data but not for the scenario you are describing.
0 Kudos
JörgPossin
New Contributor III
Hi - sorry for the delay, to answer your question, unfortunately...no you cannot use ArcGIS Server to reproject your existing WMS layer info to something else. There are methods in Server to allow reprojection of data but not for the scenario you are describing.


Thanks hgonzago. I could not find this information on the ESRI sites (or the web ;))
0 Kudos