Select to view content in your preferred language

Another WMS Problem Thread

2393
3
Jump to solution
03-06-2012 11:36 AM
NeilMartinko
Emerging Contributor
I'm trying to add my own MWS layer to the precompiled Flex Viewer 2.5.  I can some Iowa State weather WMS layers to work, but I can't get my own. 

This URL brings up an image of the County...
-- http://69.179.87.74:8888/cgi-bin/mapserv.exe?map=C:/Projects/county_sphmerc.map&service=WMS&mode=MAP...

This is the URL of the Flex Viewer app...
-- http://69.179.87.74/flex

My config.xml is...
<?xml version="1.0" ?> <configuration>     <title>Iron County Test</title>     <subtitle>a test web mapping application</subtitle>     <logo>assets/images/logo.png</logo>     <style>         <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>         <alpha>0.8</alpha>     </style>     <!-- replace the following url with your own geometryservice -->     <geometryservice url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />  <!--splashpage label="ArcGIS Viewer for Flex" config="widgets/Splash/SplashWidget--ironcounty.xml" url="widgets/Splash/SplashWidget.swf"/-->     <!-- UI elements -->     <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>     <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>     <widget right="20" top="55"    config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>     <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>   <map wraparound180="false" initialextent="-10081233 5776361 -10009752 5876400" top="30">   <basemaps>             <layer label="Streets" type="tiled" visible="flase" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>             <layer label="Aerial" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>             <layer label="Topo" type="tiled" visible="true"  url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>   </basemaps>         <operationallayers>    <layer label="NEXRAD"                                    type="wms" skipgetcapabilities="true"                                    url="http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0q.cgi"                                    version="1.1.1"                                    visible="false"                                    visiblelayers="nexrad-n0q-900913"                                    alpha=".5" />    <layer label="NWS WARNINGS"                                    type="wms"                                    skipgetcapabilities="true"                                    url="http://mesonet.agron.iastate.edu/cgi-bin/wms/us/wwa.cgi"                                    version="1.1.1"                                    visible="false"                                    visiblelayers="nexrad-n0q-900913" />    <layer label="IRON COUNTY"                                    type="wms"                                   skipgetcapabilities="true"                                    url="http://69.179.87.74:8888/cgi-bin/mapserv.exe?map=C:/Projects/county_sphmerc.map"                                    version="1.1.1"                                    visible="true"                                    visiblelayers="COUNTY" />         </operationallayers>     </map> </configuration>


The map works fine, and the weather layers appear fine, but the County boundary is missing.  Can anybody else see why?

Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Neil,

   Your issue is common to most all issues with WMS service usage in Flex Viewer. Your service supports  EPSG:900913 and DOES NOT support EPSG: 102100 or EPSG: 3857 With are Web Mercator and the Projection that your map is in. WMS services do not re-project on the fly.


You need to make sure your WMS service supports EPSG: 102100 or EPSG: 3857

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Neil,

   Your issue is common to most all issues with WMS service usage in Flex Viewer. Your service supports  EPSG:900913 and DOES NOT support EPSG: 102100 or EPSG: 3857 With are Web Mercator and the Projection that your map is in. WMS services do not re-project on the fly.


You need to make sure your WMS service supports EPSG: 102100 or EPSG: 3857

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
NeilMartinko
Emerging Contributor
OK.  Changing the WMS config to EPSG: 3857 makes it work.  900913 has the exact same specs...  It must be like somebody asking for two cups and somebody else saying, "Sorry, I don't have any.  All I have are pints."

Thanks, Robert!
0 Kudos
DasaPaddock
Esri Regular Contributor
You can also set the wkid attribute on the layer tag if the wms layer supports an equivalent wkid to the map's spatial reference.

See:
http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Layer_tag/01m30000000p000000/
0 Kudos