I've got a problem with ArcGIS for Sharepoint and the Add-WMS-Plugin from the SDK.
The plugin ist working and the WMS-layer I want to add is displayed over my base-map. Fine.
But the layer is not displayed (or not added) to the "Map-Contents"-section and so it's hard to work with this layer.
I have no clue were the problem is, but I think it must be in WMSCommand.xaml.cs.
I've done some little changes to this file, because my WMS-server does not match the name-schema from the example (not the same ending of the link) and my code looks no like this:
The WMS-link I want to add looks like this: http://fbinter.stadt-berlin.de/fb/wms/senstadt/fnp_2009
public partial class WMSDialog : UserControl
private WmsLayer wmsLayer;
private void Add_Click(object sender, RoutedEventArgs e)
wmsLayer = new WmsLayer();
wmsLayer.Url = ((ComboBoxItem)this.WMSList.SelectedItem).Tag.ToString();
// Copy the ProxyHandler.ashx file to the following location on the SharePoint Server:
// <Program Files>\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS
// Supply the Url to the proxy. Substitute the domain of your SharePoint server.
wmsLayer.ProxyUrl = "http://bimsp001/_layouts/ProxyHandler.ashx";
// In order to get the names of the layers, it needs to call getcapabilities
wmsLayer.SkipGetCapabilities = false;
wmsLayer.Version = "1.1.1";
wmsLayer.Initialized += WMSLayer_Initialized;
string layerName = "WMS Layer";
string splits = wmsLayer.Url.Split('/');
layerName = splits[splits.Length - 1];
/// In the initialized event, the getcapabilities request returns the names of the layers
private void WMSLayer_Initialized(object sender, EventArgs args)
List<string> layerNames = new List<string>();
foreach (WmsLayer.LayerInfo layerInfo in wmsLayer.LayerList)
if (layerInfo.Name != null)
wmsLayer.Layers = layerNames.ToArray();
I have tried to delete the if-statement and split just any URL I add, but this does not solve the problem.
Help would be really appreciated!
Thanks in advance!
EDIT: I just noticed that the layer-name ist displayed in the following dialog and if I want to remove the layer. But just not in Map-Contents on the right-side of the map.