<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks Jackie,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
.MGP attached (no config.xml in the .FeatureSource... is this where I could "fix" it?)</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
GetCapabilities here:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<a href="https://map.bgs.ac.uk/arcgis/services/BGS_Detailed_Geology/MapServer/WMSServer?service=WMS&version=1.3.0&request=GetCapabilities" id="OWA1fd184f9-9d65-83b9-1221-454c4514c2d2" class="OWAAutoLink">map.bgs.ac.uk/arcgis/services/BGS_Detailed_Geology/MapServer/WMSServer?service=WMS&version=1.3.0&request=GetCapabilities</a></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Images showing CMD prompt with SET HTTP_PROXY settings and resultant capture from Fiddler when previewing the .WebLayout ... showing the GetMap image request.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
As I say, in this example instance there IS a map returned because the underlying WMS supports EPSG:4326 which is passed in the request, even though the map is set to British National Grid 27700.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
My actual problem is with a private WMS that only supports EPSG:27700 and so when MGServer forms the WMS request with 4326 in it, the WMS returns the InvalidSRS (correctly as it does not advertise support for that CRS)</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
My local machine has MG4 preview, but I don't think anything significant has changed in WMS since 3.1.2</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hope all is well - Crispin</div>
<div id="appendonsend"></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> mapguide-users <mapguide-users-bounces@lists.osgeo.org> on behalf of Jackie Ng via mapguide-users <mapguide-users@lists.osgeo.org><br>
<b>Sent:</b> 04 June 2024 11:06 AM<br>
<b>To:</b> MapGuide Users Mail List <mapguide-users@lists.osgeo.org><br>
<b>Cc:</b> Jackie Ng <jumpinjackie@gmail.com><br>
<b>Subject:</b> [mapguide-users] MapGuide WMS Requests are Always in ESSG:4326 ?</span>
<div> </div>
</div>
<div style="direction: ltr;">Hi Crispin,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Could you attach or send me a .mgp of the WMS feature source and its current configuration document so we have a baseline from which to determine who/what is at fault and what can be done? I want to eliminate the possibility that
following your setup steps results in a different feature source + config doc combination.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">- Jackie</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">You wrote:</div>
<pre><div style="direction: ltr; color: rgb(0, 0, 0);">Hi,
I have a client with Map and MapGuide connecting to a WMS service for UK maps. AutoCAD Map makes a request OK using similar FDO WMS provider ... but the MG logs showed a InvalidCRS message when MGServer makes a map request.
I realised (via a public WMS and a helpful blog on using Fiddler) that the issue is that MG is requests always using EPSG:4326 within the Request=GetMap.
When I set my .MapDefinition up I used a British EPSG:27700 that is listed as supported in the GetCapabilities but the request does not use this native projection.
In the case of the problem service it ONLY published on EPSG:27700 and a few others and NOT on the most common EPSG:4326 – and as such returns an InvalidSRS response when MG sends it's converted request in using 4326.
A solution, obvs, is to get the provider to add the CRS into the GetCapabilities, however I think this is a bug (is there a workaround with the configuration document?) as there is no obvious requirement for this when working with projected maps and the projection is published in the WMS.
Example:
1.
Create a new WMS .FeatureSource to <a href="https://map.bgs.ac.uk/arcgis/services/BGS_Detailed_Geology/MapServer/WMSServer?service=WMS&version=1.3.0" id="OWA81a0ba80-5998-b730-bdb8-4042a6f0c51f" class="OWAAutoLink" data-auth="NotApplicable">https://map.bgs.ac.uk/arcgis/services/BGS_Detailed_Geology/MapServer/WMSServer?service=WMS&version=1.3.0</a>
1.
Create a new layer to "BGS 50k Bedrock" (a Maestro bug does not list all layers, edit XML by hand)
2.
Create a New Map, using EPSG:27700, add the layer
3.
Create a New layout and set initial view to centre on 300000,600000 and zoom scale 40000
4.
Map will preview OK but the underlying request shows similar to below
<a href="https://map.bgs.ac.uk/arcgis/services/BGS_Detailed_Geology/MapServer/WmsServer?version=1.3.0&service=WMS&REQUEST=GetMap&EXCEPTIONS=XML&LAYERS=BGS.50k.Bedrock&STYLES=&CRS=EPSG:4326&SRS=EPSG:4326&FORMAT=image/png&BBOX=56.211896,-3.973780,56.281919,-3.810279&HEIGHT=782&WIDTH=1032&TRANSPARENT=FALSE&BGCOLOR=0xFFFFFF" id="OWA35b624ec-7997-7199-9778-7fbdf84ec743" class="OWAAutoLink" data-auth="NotApplicable">https://map.bgs.ac.uk/arcgis/services/BGS_Detailed_Geology/MapServer/WmsServer?version=1.3.0&service=WMS&REQUEST=GetMap&EXCEPTIONS=XML&LAYERS=BGS.50k.Bedrock&STYLES=&CRS=EPSG:4326&SRS=EPSG:4326&FORMAT=image/png&BBOX=56.211896,-3.973780,56.281919,-3.810279&HEIGHT=782&WIDTH=1032&TRANSPARENT=FALSE&BGCOLOR=0xFFFFFF</a>
Many thanks,
Crispin
Crispin Hoult</div></pre>
</body>
</html>