there are examples in the “HowDoI”-solution how to integrate a WMS-service, unfortunately the example-uri references are not reachable. Is there any working example of how to integrate a WMS, maybe using a public WMS-feature?
Because some reason we hadn’t put a sample in wiki shows how to use the WMS server. But you can use that like this:
WmtsLayer wmtsLayer = new WmtsLayer(new Collection { new Uri(“your link”) });
wmtsLayer.Parameters.Add(“LAYER”, “your layer”);
wmtsLayer.Parameters.Add(“STYLE”, “default”);
wmtsLayer.Parameters.Add(“FORMAT”, “image/png”);
var overlay = new LayerOverlay();
overlay.Layers.Add(wmtsLayer);
wpfMap1.Overlays.Add(overlay);
Which parameter need be added is decided by the WMS server you want to connectted, you can get the parameters from the capability, or you can use the event wmtsLayer.SendingWebRequest to double check whether the request url for tile is works for your WMS server.
when i put your code in my Map-Loaded-method, i get an exception at runtime:
System.ArgumentNullException wurde nicht behandelt.
Message: Ein Ausnahmefehler des Typs “System.ArgumentNullException” ist in WpfDesktopEdition.dll aufgetreten.
Zusätzliche Informationen: Der Wert darf nicht NULL sein.