Howdy,
I have been working with WMS layers recently and have successfully displayed WMS layers from a variety of services available on the web. There is one service that I have had no luck with at all. Here is the code:
winformsMap1.MapUnit = GeographyUnit.DecimalDegree
winformsMap1.BackgroundOverlay.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)
Dim wmsImageLayer As WmsRasterLayer
wmsImageLayer = New WmsRasterLayer(New Uri("geostor.arkansas.gov/ArcGIS/services/ORTHO2006-WMS/MapServer/WMSServer"))
wmsImageLayer.UpperThreshold = Double.MaxValue
wmsImageLayer.LowerThreshold = 0
wmsImageLayer.Open()
For Each layerName As String In wmsImageLayer.GetServerLayerNames()
wmsImageLayer.ActiveLayerNames.Add(layerName)
Next
Dim staticOverlay As New LayerOverlay()
staticOverlay.Layers.Add("wmsImageLayerArk", wmsImageLayer)
winformsMap1.Overlays.Add(staticOverlay)
winformsMap1.CurrentExtent = wmsImageLayer.GetBoundingBox
wmsImageLayer.Close()
winformsMap1.Refresh()
I have successfully displayed this service in our current application (not ThinkGeo) so I know the service is working.
Any idea what's going on?
Thanks!
Steve