Hi,
I'm trying to create a dotspatial programm which can use online ressources as basemaps. If I'm right there are two different ways to do it with:
Somewhere I read that BruTile can manage WMS too. But I didn't find any samples...
So I tried out the WebMap-Plugin. Unfortunately the usage of the DotSpatial.Plugins.WebMap.WMS.WMSClient isn't documented anywhere (or I didn't find it).
I started with the following code:
Is there anybody who can tell me how to go on at this point?
Thanks for any help or example code (in vb.net or c#)!
Regards, Tobias
I'm trying to create a dotspatial programm which can use online ressources as basemaps. If I'm right there are two different ways to do it with:
- the dotspatial.controls.BruTileLayer.dll or
-
the dotspatial.plugins.WebMap.dll
Somewhere I read that BruTile can manage WMS too. But I didn't find any samples...
So I tried out the WebMap-Plugin. Unfortunately the usage of the DotSpatial.Plugins.WebMap.WMS.WMSClient isn't documented anywhere (or I didn't find it).
I started with the following code:
Dim wmsClient As New DotSpatial.Plugins.WebMap.WMS.WMSClient
Dim requestStr As String = wmsClient.CreateCapabiltiesRequest("http://geoportal.geodaten.niedersachsen.de/geodatenportal/servlet/gtEntryPoint?request=GetCapabilities&service=WMS&version=1.1.1")
wmsClient.ReadCapabilities(requestStr)
wmsClient.CRS = "EPSG:32632"
wmsClient.Projection = KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone32N
At this time, my wmsClient-object contains all the properties published by the WMS-Server. In the Tooltips of VisualStudio it also shows me the properties of all the ChildLayers. So I seem to be on the right way. As next step I tried to define a childLayer and add it to my map as a new layer. Dim wmsLayer As New DotSpatial.Plugins.WebMap.WMS.WMSClient.ServerLayer
wmsLayer = wmsClient.Layer.ChildLayers(0)
But I didn't find a way to tell my map-control how to read the wmsLayer or do anything else with the wmsClient-object.....Is there anybody who can tell me how to go on at this point?
Thanks for any help or example code (in vb.net or c#)!
Regards, Tobias