Hi,I am having issues trying to get WMS layers to display also. I have defined a test service using a Canada Lambert COnformal Conic (EPSG 102002) projection and enabled WMS for it. Then, in my Silverlight application, I try to add it to the map in code using:
case"wms":
var wmsLayer = newWmsLayer();
wmsLayer.Url = "http://s5-bsc-ims2.nrn.nrcan.gc.ca/ArcGIS/services/testwms1/MapServer/WMSServer";
wmsLayer.ID = "Test WMS Service";
wmsLayer.Layers = new string[] { "0" };
wmsLayer.Visible = true;
wmsLayer.SkipGetCapabilities = true;
wmsLayer.SupportedSpatialReferenceIDs= new int[] { 102002 };
wmsLayer.Version="1.3.0";
layers.Add(wmsLayer);
break;
Later in the code, the layers list is added to the map. In fiddler, when it tries to load the WMS service, I see the following:
GET /ArcGIS/services/testwms1/MapServer/WMSServer?SERVICE=WMS&REQUEST=GetMap&WIDTH=1071&HEIGHT=746&FORMAT=image/png&LAYERS=0&STYLES=&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&VERSION=1.3.0&CRS=EPSG:0&BBOX=-3600246.41388271,-936638.5,4433553.57338271,4659267 HTTP/1.1
This generates an error I can see in Fiddler because it is requesting the service using EPSG code 0 instead of 102002!!!
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><ServiceExceptionReport version="1.3.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException code="InvalidCRS">
Parameter 'crs' contains unacceptable value.
</ServiceException>
</ServiceExceptionReport>
So, why is the application sending an EPSG code of 0 when I asked it to use 102002?Paul