Select to view content in your preferred language

Adding a WMS layer

3592
11
05-09-2011 07:29 PM
MarkSmith1
Occasional Contributor
I saw that the new release of the viewer includes a new Layer tag that allows you to overwrite the WKID sent to a WMS server. Does this mean you can add a WMS layer to a viewer that is using a projection NOT supported by the WMS service?
I'm trying to add the NRCan Toporama service to my viewer (which is using wkid 102100) but nothing is showing up in when I examine the response from the server in Fiddler I get an unsupported SRS message. The Toporama service does not support Web Mercator (102100).
Maybe I don't understand but the change at 2.3.1 made it sound like I could force the wms to use the viewers wkid.
Here is the tag I'm using:

<layer label="NRCan" type="wms" visiblelayers="hypsography" url="http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en" wkid="102100" skipgetcapabilities="true" version="1.1.1"/>
Tags (2)
0 Kudos
11 Replies
BjornSvensson
Esri Regular Contributor
Yes, this is supported in 2.3.1. 

You just need to change the wkid in your example.  You can't force the WMS server to use a WKID it doesn't support.  Instead you tell it to use an ID that it does understand - 900913 (Google's ID for Web Mercator).
<layer label="NRCan"
    type="wms"
    skipgetcapabilities="true"
    url="http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en"
    version="1.1.1"
    visible="true"
    visiblelayers="limits"
    wkid="900913"
/>
0 Kudos
MarkSmith1
Occasional Contributor
That did it! Thank you very much.
0 Kudos
MLowry
by
Occasional Contributor II
I'm trying to configure a pop-up for a WMS, and it is not working. The WMS provides the right symbology, but for some reason does not have pop-up configuration.

Are pops usable with a WMS?
0 Kudos
BjornSvensson
Esri Regular Contributor
No, popups are not supported for WMS.

"...the ArcGIS Viewer for Flex supports pop-ups windows for tiled and dynamic map services, as well as feature layers."
http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Pop_up_configuration_files/01m30000002...
0 Kudos
MLowry
by
Occasional Contributor II
No, popups are not supported for WMS.

"...the ArcGIS Viewer for Flex supports pop-ups windows for tiled and dynamic map services, as well as feature layers."
http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Pop_up_configuration_files/01m30000002...


Well WMS's are great to have for up to date information, but that's pretty worthless if the up to date information isn't accessible to the end user via pop-ups. I hope this is supported in a future release, or I hope I am misunderstanding how Flex Viewer is used to view WMS's.
0 Kudos
GeraldLee__GISP
Occasional Contributor
I have to agree. Viewing popups for WMS services would be a great enhancement. PLEASE consider including this functionality!!..
0 Kudos
ElenaBachilo
New Contributor II
I'm trying to add wms service (wms.ess-ws.nrcan.gc.ca/wms/toporama_en) to my flexviewer 3.0 web application. I add code displayed below into config file. Do I have to do something else to make this service visible?

Thanks
0 Kudos
BjornSvensson
Esri Regular Contributor
I add code displayed below into config file.

Could you share the exact line of your config.xml?
Are you sure that URL is a working WMS service?
0 Kudos
BjornSvensson
Esri Regular Contributor
I'm trying to add wms service (wms.ess-ws.nrcan.gc.ca/wms/toporama_en) to my flexviewer 3.0 web application. I add code displayed below into config file. Do I have to do something else to make this service visible?


No, that should be it.  Works fine when I test it
        <operationallayers>
            <layer label="NRCan"
                type="wms"
                skipgetcapabilities="true"
                url="http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en"
                version="1.1.1"
                visible="true"
                visiblelayers="limits"
                wkid="900913"
            />
        </operationallayers>

What basemaps are you using? (Is it in a different projection than the Esri basemaps?)
0 Kudos