Hello,
I am trying to add a WMS image to my map control. When I try to either open the WMSFeatureLayer or do a map.refresh after adding the layer and associated overlay to the map, I receive the following error:
"LAYERS parameter is missing"
The code I am using so far is as follows:
Dim overlayRaster As New LayerOverlay
Dim layerWMS As New WmsRasterLayer(New Uri("giswebservices.massgis.state.ma.us/geoserver/wms?"))
layerWMS.Parameters.Add("LAYERS", "massgis:GISDATA.IMG_COQ2005")
layerWMS.Parameters.Add("SRS", "EPSG:26986")
layerWMS.Parameters.Add("FORMAT", "image/gif")
overlayRaster.Layers.Add(layerWMS)
map.Overlays.Add("Raster", overlayRaster)
map.Refresh
I was trying to retrieve the URI by doing layerWMS.GetRequestUrl but it seems the layer must be open first and this error occurs durring layerWMS.Open as well. Any help is appreciated.
Thanks.