Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

New Post: Tutorial or HowTo for WMS Plugin and/or BruTileLayer

$
0
0
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:
  1. the dotspatial.controls.BruTileLayer.dll or
  2. the dotspatial.plugins.WebMap.dll
After several attempts I was successfull with a new compiled BruTileLayer.dll. Unfortunately it only works with Bing- and OSM-Maps in the WebMercator-coordinate system. There seems to be no way to reproject the OSM-Maps.
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

Viewing all articles
Browse latest Browse all 3973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>