I am trying to preview a published raster image on a MapServer server.
The map published with EPSG: 4326, is only displayed when I set Axys order to XY. However, the view is distorted.
Can you help me solve this problem?
string url = "http://localhost:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/patria/patria.map";
wpfMap.MapUnit = GeographyUnit.DecimalDegree;
Uri theUrl = new System.Uri(url);
WmsRasterLayer wms = new WmsRasterLayer(theUrl);
wms.AxisOrder = ThinkGeo.MapSuite.Layers.WmsAxisOrder.XY;
wms.Exceptions = "XML";
wms.ActiveLayerNames.Add("ortofoto");
wms.Crs = "EPSG:4326";
//wms.Crs = "EPSG:3857";
// -------------------
wms.Open();
//string v = wms.GetServiceVersion();
var bb = wms.GetBoundingBox();
wms.UpperThreshold = double.MaxValue;
wms.LowerThreshold = 0;
LayerOverlay wmsOverlay = new LayerOverlay();
wmsOverlay.Name = "WMS";
//wmsOverlay.TileType = TileType.HybridTile;
wmsOverlay.TileType = TileType.SingleTile;
wmsOverlay.Layers.Add(wms);
// -------------------
wpfMap.CurrentExtent = bb;
wpfMap.Overlays.Add(wmsOverlay);
wpfMap.Refresh();