Select to view content in your preferred language

Flex viewer and WxS

1895
5
02-03-2012 12:22 AM
OlivierForêt
New Contributor
Hello,

I would like to know how to use wms or wfs layers in the flexviewer ?
In the config.xml, do I have to write it as a basemap or operationnal layer ? how do I mention my WxS layer ?

Thank you.
Tags (2)
0 Kudos
5 Replies
BjornSvensson
Esri Regular Contributor
I would like to know how to use wms or wfs layers in the flexviewer ?
In the config.xml, do I have to write it as a basemap or operationnal layer ? how do I mention my WxS layer ?


WMS is supported similar to other layer types.  It can be either a basemap or an operational layer.
http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Layer_tag/01m30000000p000000/

WMTS support was added in the API in version 2.5 and will be supported in the next release of the Flex Viewer (2.6/3.0).

WFS is not supported.
0 Kudos
OlivierForêt
New Contributor
Thanks Bjorn for the answer, but I just cant get any display on the map,

I tried to paste that line into operationnal layers, I see the label on the viewer, but nothing appears.

<layer label="WMS" type="wms" visible="true" alpha="0.5" servicename="Risques en Loiret" layer="Risques en Loiret" format="image/png" crs="EPSG:4326">http://cartorisque.prim.net/wms/45?</layer>

Thank you for those who can help me.
0 Kudos
OlivierForêt
New Contributor
I tryed this

<layer  label="Cartographie des risques naturels et technologiques en Loiret"
      type="wms"
   visible="false"
   alpha="0.75"
   servicename="Risques en Loiret"
   layer="D45"
   imageformat="image/png"
   url="EPSG:4326">http://cartorisque.prim.net/wms/45?</layer>

and I have this error

MapManager

Cartographie des risques naturels et technologiques en Loiret layer
failed to load: Code d�??erreur : Server.Error.Request
Informations sur l�??erreur : Erreur de requête HTTP
Détails de l�??erreur : Erreur : [IOErrorEvent type="ioError" bubbles=false
cancelable=false eventPhase=2 text="Error #2032"]. URL: http://
ars45f1111-001:8887/carto/EPSG:4326?
SERVICE=WMS&VERSION=1%2E3%2E0&REQUEST=GetCapabilities


I cant solve this, I did the GetCapabilities on the WMS Server to see the informations about the differents layers.
Thanks per advance
Oliv
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Olivier,

   You have several things wrong in your layer. It should look like this:

<layer
                label="Cartographie des risques naturels et technologiques en Loiret" skipgetcapabilities="true"
                type="wms" visible="false" alpha="0.75" wkid="4326" version="1.1.1"
                visiblelayer="PPR_INONDATION_LOIRE_ALEA" url="http://cartorisque.prim.net/wms/45?" />


But that really does not matter as that WMS Service only supports geographic and therefore will not work with cached WebMercator basemaps.

All the layers in your map should be using the same or equivalent wkids  so you'll need to find a common wkid supported by all the layers in your  map. If your other layers are cached using web mercator and this wms service only supports geographic, then you will not be able to use them together.
Quote from Dasa (Flex API Team) here:

http://forums.arcgis.com/threads/49500-WMS-skipgetcapabilities-bug-in-flexviewer-2.2?highlight=WMS+L...

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
OlivierForêt
New Contributor
Thank Robert for your answer, I've been to the hospital for a few weeks following a small accident.

I installed GeoServer to replace ArcGis Server (no money).

My WMS service is normally active in the WGS84 system, epsg:4326

Exemple of a png8

http://164.131.66.41:8080/geoserver/pa_r24/wms?service=WMS&version=1.1.0&request=GetMap&layers=pa_r2...

In the config.xml
I left only this layer, but nothing is displayed, I have no basemap, only one operationnal layer, written that way.

<layer
                label="Etablissements PA en Région Centre" skipgetcapabilities="true"
                type="wms" visible="true" alpha="0.75" wkid="4326" version="1.1.0"
                visiblelayer="pa_r24" url="http://164.131.66.41:8080/geoserver/pa_r24/wms?" />

I dont understand, thanks guy for helping.
0 Kudos