Select to view content in your preferred language

How do I add WMS Service?

1051
2
03-04-2011 09:30 AM
NathanEnge
Esri Contributor
I tried looking in the concepts page, but it is a bit lacking on how to add WMS as mapservice.
If the WMS is located here:
http://openmaps.gov.bc.ca/imagex/ecw_wms.dll?service=wms&version=1.1.1&request=getcapabilities


And the layer I want to add as a <basemap> is within the above xml (and it is has the supported projection...):
<Layer queryable="0" opaque="0" noSubsets="0">
  <Name>BC_S5L5_BC_2004_2006_BCALB_15M_PANB321_ENH</Name> 

  <Title>s5l5_bc_2004_2006_bcalb_15m_panb321_enh</Title> 

  <LatLonBoundingBox minx="-134.41979398739258" miny="47.70526553162415" maxx="-115.57727033268345" maxy="60.133252241984927" /> 

  <SRS>EPSG:3005</SRS> 

  <BoundingBox SRS="EPSG:3005" minx="528460" miny="331205" maxx="1585195" maxy="1683350" resx="15" resy="15" /> 

  <SRS>EPSG:102190</SRS> 

  <BoundingBox SRS="EPSG:102190" minx="528460" miny="331205" maxx="1585195" maxy="1683350" /> 

  <SRS>EPSG:4326</SRS> 

  <BoundingBox SRS="EPSG:4326" minx="-134.41979398739258" miny="47.70526553162415" maxx="-115.57727033268345" maxy="60.133252241984927" /> 

  <SRS>EPSG:32608</SRS> 

  <BoundingBox SRS="EPSG:32608" minx="532478.74427222123" miny="5298423.5732139433" maxx="1757479.9442286484" maxy="6783610.7569284178" /> 

  <SRS>EPSG:32609</SRS> 

  <BoundingBox SRS="EPSG:32609" minx="196833.37191107537" miny="5300075.3127793223" maxx="1308815.5194954565" maxy="6699526.3919917801" /> 

  <SRS>EPSG:32610</SRS> 

  <BoundingBox SRS="EPSG:32610" minx="-194825.75588659977" miny="5294653.8146051988" maxx="916628.34410429408" maxy="6693319.40823384" /> 

  <SRS>EPSG:32611</SRS> 

  <BoundingBox SRS="EPSG:32611" minx="-642907.25030450593" miny="5284254.2948969016" maxx="579962.45330657228" maxy="6766831.7235350413" /> 

- <DataURL>
  <Format>text/xml</Format> 

  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://openmaps.gov.bc.ca/imagex/ImageX.dll?dsinfo?layer=/wms/ortho/bc/s5l5_bc_2004_2006_bcalb_15m_p..." /> 

  </DataURL>


  </Layer>



What would be the entry in the config.xml? Currently I have this:
<layer label="Aerial" type="wms" visible="false" 
       url="http://openmaps.gov.bc.ca/imagex/ecw_wms.dll?"
                   version="1.1.1"/>

But I don't know how to reference the particular layer...
Any guidance on this would be appreciated.
Tags (2)
0 Kudos
2 Replies
DasaPaddock
Esri Regular Contributor
Try:

            <layer label="Aerial WMS" type="wms" visible="false" 
                   url="http://openmaps.gov.bc.ca/imagex/ecw_wms.dll"
                   skipgetcapabilities="true" version="1.1.1"
                   visiblelayers="BC_S5L5_BC_2004_2006_BCALB_15M_PANB321_ENH"/>


The layers are set in "visiblelayers". You need to also set "skipgetcapabilities" to true since they don't have a crossdomain.xml file at http://openmaps.gov.bc.ca/crossdomain.xml that allows other domains to request the capabilities.

Reference:
http://help.arcgis.com/en/webapps/flexviewer/help/layer_tag.htm
0 Kudos
NathanEnge
Esri Contributor
THANKS!!!!
It is somewhat less intuitive as REST endpoints are.
0 Kudos