Hello everyone,
I'm using a WmsRasterLayer in my application but I've got an issue when I try to pan or to zoom on the map.
This is my method to initialize the layer :
public void AddWMSLayer(BackgroundLayer backgroundWMS)
{
this.MapUnit = GeographyUnit.Meter;
try
{
WmsRasterLayer worldLayer = new WmsRasterLayer();
worldLayer.Uri = new Uri(backgroundWMS.urlValue);
worldLayer.UpperThreshold = double.MaxValue;
worldLayer.LowerThreshold = 0;
worldLayer.TimeoutInSecond = 60;
worldLayer.Exceptions = "Application/VND.OGC.SE_XML";
#region Passage des parametres
worldLayer.Parameters["REQUEST"] = backgroundWMS.request;
worldLayer.Parameters["OUTPUTFORMAT"] = backgroundWMS.outPutFormat;
worldLayer.Parameters["SERVICE"] = backgroundWMS.serviceOGC;
worldLayer.Parameters["STYLES"] = backgroundWMS.stylesLayers;
worldLayer.Parameters["SRS"] = "EPSG:" + backgroundWMS.projValue;
//Ajout du layer
worldLayer.ActiveLayerNames.Add(backgroundWMS.layers);
//If I can't add these parameters, the layer doesn't work
worldLayer.Parameters["BBOX"] = "550000,60000,660000,140000";
worldLayer.Parameters["WIDTH"] = "800";
worldLayer.Parameters["HEIGHT"] = "582";
#endregion
GoogleMapZoomLevelSet zoomLevelSet = new GoogleMapZoomLevelSet();
zoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
this.ZoomLevelSet = zoomLevelSet;
AddStaticLayer(backgroundWMS.name, worldLayer);
}
catch (Exception ex)
{
GeosysLog.Error(ex);
throw new StaticLayerException(32310, string.Format(ResXManager.GetResourceString("mappingWMSError"), backgroundWMS.urlValue), ex);
}
}
If I don't add the BBOX, WIDTH and HEIGHT parameters, the layer isn't displayed. If I add them, the layer is displayed but it's static.
When I zoom, only the feature changes. Same thing when I pan the map, only the feature moves. The WMS layer doen't move or zoom.
Do you have any idea about that issue ?
Thanks by advance.