Select to view content in your preferred language

Adding WMS Service

5301
20
02-22-2012 06:23 AM
jayshukla
Regular Contributor
Hello There,
Is there a way to add a wms image service in basemap gallery?
Thanks
Jay
0 Kudos
20 Replies
KatherineDalton
Esri Regular Contributor
Hi Courtney,

When you extract the zip file, the folder structure should initially look like the attached screenshot. You're not seeing this?


[ATTACH=CONFIG]12460[/ATTACH]

Katy
Katy Dalton | Technical Consultant
THE SCIENCE OF WHERE™
0 Kudos
CourtneyBrozovsky
Deactivated User
After extracting it to a less messy folder I was able to see the same output. However, I get errors when I try to open the .sln.

[ATTACH=CONFIG]12461[/ATTACH]

[ATTACH=CONFIG]12462[/ATTACH]
0 Kudos
KatherineDalton
Esri Regular Contributor
My apologies, Courtney, for not catching this sooner - you need Visual Web Developer Express, not Visual C# Express.

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express

Katy
Katy Dalton | Technical Consultant
THE SCIENCE OF WHERE™
0 Kudos
jayshukla
Regular Contributor
Hi Katy,
I was trying to download the sample from the link but it says "Service Unavailable". I have tried this twice now so wanted to check if there is any issue.

On your suggestion for ArcGISonline option, I did try that but didn't get far with this. While creating the map, it does accepth the URL but it doesnt ask me to specify login/pwd and eventully it doesnt show in the map. This is a secured service. 

Thanks
Jay
0 Kudos
jayshukla
Regular Contributor
Hi katy,

My quetion is slightly different now. It turns out that I was trying to add is an ArcIMS service not an WMS service. Please let me know if the approach above would still work?
Thanks
Jay
0 Kudos
KatherineDalton
Esri Regular Contributor
Hi Jay,

Apologies for that; I'm not sure why but I think our samples page went down for a bit. It should be back up and running now.

We do not support adding an ArcIMS layer out of the box. I think you can still use the WMS sample as a start if you want to write a custom tool to do it. Take a look at this forum and see what you think: http://forums.arcgis.com/threads/15810-ArcIMS-Service-in-ESRI-SIlverlight-API

Katy
Katy Dalton | Technical Consultant
THE SCIENCE OF WHERE™
0 Kudos
AaronKreag
Deactivated User
Courtney Smith,

I was getting the same or similar errors just a little bit ago.

Here is what fixed it.

Update Visual Studio Web Express 2010 if needed.
Make sure that Silverlight 3.0, 4.0, and 5.0 are installed from microsoft.
Download and Install the Silverlight 5.0 SDK from microsoft.
Download/Install the Silverlight 5.0 toolkit for Visual Studio web.

Go to the ESRI website and make sure that you have the Silverlight Viewer 3.0.
Then download/install the ESRI Viewer for Silverlight 3.0 SDK.

Once I did all that I rebooted and opened up the .sln file that comes from the ESRI sample download, it all loaded great.
I edited the code as described in this thread (because its still not correct) and hit build solution, it all built great.

My only issue now is that I cant seem to add or find the "add-in" when going through the Silverlight viewer.  I will be working on that issue now.

Cheers
Aaron Kreag
0 Kudos
CourtneyBrozovsky
Deactivated User
Thank you very much for your reply, Aaron. I will try this if I am working with the Silverlight Viewer again, but recently I've been running with the ArcGIS API for JavaScript. Your help is greatly appreciated!
0 Kudos
helgesmebye
Emerging Contributor
Hi ,

I downloaded the AddWMS sample, did the modifications suggested by Katy and deployed it to my Silverlight Viewer 3.0 map.

It runs fine and add a WMS layer, but I am not able to add two layers the way I would expect.

WMSLayer number two seems to be some kind of clone of the first WMS layer (the name and contet are the same.  when I turn off one layer all other WMS layers are also turned off)

First I thought that this was because of the global variable "WmsLayer wmsLayer" in the Addin.  I made it non global but it dit not do any difference.

I also tried to debug the code in the viewer that comes with the sample - but the "add wms" button did not start the tool.

How can I add two wms layers to the map (what kind of modifications do I have to do with the addin)?

Thanks,
Helge
0 Kudos
helgesmebye
Emerging Contributor
Hi,

I got it fixed.  If the layer is initialized with the same name I get problems.  Renaming it in the toc does not help since this is not really the name of the layer.

Giving the layer an unique name solves the problem.

-helge
0 Kudos