Select to view content in your preferred language

WMS service not adding to the map in Silverlight

1704
6
02-28-2013 07:27 PM
SantoshV
Emerging Contributor
Hi
I have created a MapService on ArcGIS Server 10 and enabled the  WMS capability
and wrote a code to add this WMS service on my Silverlight 4 map application but it does not add the service, the map is not visible, but when I add the WMS url in ArcMAP I can view the map
Please comment what am I missing here?
Code goes here

            ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer newLayer = new ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer();
            newLayer.Url = "http://dev9/arcgis/services/merged_soi1/MapServer/WMSServer";
            newLayer.ID = "newLayer1";
            newLayer.SkipGetCapabilities = true;
            MyMap.Layers.Add(newLayer);
0 Kudos
6 Replies
DominiqueBroux
Esri Frequent Contributor
You have to set the WMS.Layers property, which is required to get the layer displayed.
If you still run into problems after setting this property, try using fiddler to look at the requests sent to the server. That might give a clue about the issue.
0 Kudos
SantoshV
Emerging Contributor
You have to set the WMS.Layers property, which is required to get the layer displayed.
If you still run into problems after setting this property, try using fiddler to look at the requests sent to the server. That might give a clue about the issue.


Hi,
    Thank you for your reply
You were right after setting the WMS.Layer property it worked fine..
But I still have an issue

I have added a few .dgn files in the .mxd and published this data which I wanted to consume as an WMS service in order to retain its current symbologies
But the dgn map is not visible or projected on the map.
Is this a problem with Projection system ..how do I address this issue..

Please guide me to  publish and display a few .dgn's
0 Kudos
DominiqueBroux
Esri Frequent Contributor
But the dgn map is not visible or projected on the map.
Is this a problem with Projection system ..how do I address this issue..

Before publishing your mxd, you have to set the spatial reference of your dgn files
0 Kudos
SantoshV
Emerging Contributor
Before publishing your mxd, you have to set the spatial reference of your dgn files


Hi
Thank you for you reply I have set the spatial reference for the .dgn file
The .dgn is now correctly displayed on the map in ArcMAP where I am using Bing maps as my base map
But when I call this .dgn into my ArcGIS Silverlight application the .dgn is not seen

            <esriWMS:WmsLayer ID="AGSWMSLayer" 
            Url="http://dev9/arcgis/services/merged_soi1/MapServer/WMSServer"   
            SkipGetCapabilities="False"
            Layers="1" Version="1.3" Opacity="0.7" />



What am I missing here? I have tried everything I know.
Please guide...
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Sorry, not sure I can help. I rarely published dgn files.

Nevertheless are you sure it's a WMS issue? Is it working when using the MapServer and an ArcGISMapServiceLayer?

My only clue about WMS: are you sure the layer "1" is the one containing the dgns?
0 Kudos
SantoshV
Emerging Contributor
Sorry, not sure I can help. I rarely published dgn files.

Nevertheless are you sure it's a WMS issue? Is it working when using the MapServer and an ArcGISMapServiceLayer?

My only clue about WMS: are you sure the layer "1" is the one containing the dgns?



dbroux
   Thank you for your reply you were right the problem was with the WMS.Layers I corrected it and the dgn's displayed fine...
The reason I publish the dgns was I have over a thousand different symbols for my geometry's but when I import this dgn files into ArcSDE I loose the geometry styles .. so I decided to publish the dgn itself..

Is there any other way of  getting my symbols into the geodatabase?
0 Kudos