Select to view content in your preferred language

Adding a WMS

2194
2
07-19-2011 09:31 AM
SamerToukan
Emerging Contributor
Hello!

I am having a little trouble adding a WMS to the flex viewer,
The WMS I am trying to add is located, http://activefiremaps.fs.fed.us/wms.php

here is what I have simply added into the config file of the viewer, under the other WMS.
<layer label="Fire Watch" type="dynamic" visible="false"
   url="http://activefiremaps.fs.fed.us/cgi-bin/mapserv.exe?map=conus_fire_2001-2009.map& SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&version=1.0.0"/>

It is not showing up on the map. All help is much appreciated.
Cheers
Tags (2)
0 Kudos
2 Replies
sumedhasilla
Emerging Contributor
Please try the following format:

<operationallayers>
<layer label="wmsLayer�?� type="wms" visible="true" version="1.1.1" wkid ="3857" visiblelayers="0,1"
url="http://<server name>/ArcGIS/services/<service map>/MapServer/wmsServer?"/>
</operationallayers>

Example:

<layer label="wmsLayer" type="wms" visible="true" version="1.1.1" visiblelayers="us_states_gen"
url="http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/forecasts" />

(make sure your basemap has spatial reference of your wms service layers)

Hope its helpful...
0 Kudos
EstherColero
Occasional Contributor
Hello,

If sume5583 option doesn't work, add skipgetcapabilities="true" and a list of  the default visible layers.

      <layer label="example WMS" type="wms" visible="true
                   url="http://activefiremaps.fs.fed.us/cgi-bin/mapserv.exe?map=conus_fire_2001-2009.map&SERVICE=WMS&version..."
                   skipgetcapabilities="true" version="1.0.0"
                   visiblelayers="MODIS_Detections;Shaded_Relief,Shaded_Relief,Blue_Marble,OCEAN,State_Boundaries,Cumulative_Aqua_2009,Cumulative_Terra_2009,Cumulative_2008"/> <!-- and more layers...-->

I can't try the service (I'm on holidays 🙂 ), but as I can see:
  - There is not a capabilities.xml in the root of the WMS server. Without this file you need the skipgetcapabilities="true" and you can't change the sublayers visibility in TOC.
  - this WMS service only supports epsg:4269. Is this your spatial reference? As I know, you can't do project on the fly with a WMS service using Flex viewer 😞

Try it, and good luck!!
0 Kudos