<div dir="ltr"><div class="gmail_quote gmail_quote_container"><div>I have a partial fix for the issue involving incompatible coordinate results when using GeoMoose 3.13 and a non-Mapserver WFS.</div><div>The fix can be implemented by adding the following JS to the index.html file and then calling convertCoordinates as needed.</div><div>There may be a different fix but I didn't find it.</div><div>Hopefully this will help those looking to use the latest GM with a WFS back end.</div><div><br></div><div>-- index.html</div><div><head><br></div><div>  ...</div><div>  <script type="text/javascript"></div>    function convertCoordinates(x3857, y3857) {<br>      const e = 2.7182818284;<br>      const X = 20037508.34;<br>      var lat4326 = (x3857 * 180) / X;<br>      var lon4326 = y3857 / (X / 180);<br>      const exponent = (Math.PI / 180) * lon4326;<br>      lon4326 = Math.atan(Math.pow(e,exponent));<br>      lon4326 = lon4326 / (Math.PI / 360);<br>      lon4326 = lon4326 - 90;<br>      return [lon4326, lat4326];<br>    }<br>  </script><br></head></div><div class="gmail_quote gmail_quote_container">---</div><div class="gmail_quote gmail_quote_container"><br></div><div class="gmail_quote gmail_quote_container">--- Select Features template example</div><div class="gmail_quote gmail_quote_container"><td><br>    <a<br>      title="Zoom to Parcel"<br>      onClick="<br>      var bboxArray = [{{ properties.boundedBy | join }}];<br>      var lonlatLLArray = convertCoordinates(bboxArray[0], bboxArray[1]);<br>      var lonlatURArray = convertCoordinates(bboxArray[2], bboxArray[3]);<br>      app.zoomToExtent([lonlatLLArray[0],lonlatLLArray[1],lonlatURArray[0],lonlatURArray[1]],'EPSG:4326')"<br>    ><br>      <i class="icon zoomto"></i><br></div><div class="gmail_quote gmail_quote_container">...</div><div class="gmail_quote gmail_quote_container">---</div><div class="gmail_quote gmail_quote_container"><br></div><div class="gmail_quote gmail_quote_container"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Good day,<br>
Thank you for all the hard work on the new version of GM.<br>
This question involves GM 1.13.1 on Ubuntu 24.04.2 LTS installed using the<br>
gm3-examples-3.13.1.zip and using QGIS Server 3.34.4 as the WMS and WFS<br>
back end.<br>
<br>
The WMS GetMap, GetLegendGraphic and GetFeatureInfo are working correctly.<br>
<br>
I seem to have run into an issue that I need some help resolving with the<br>
WFS requests.<br>
<br>
When adding a QGIS WFS layer to GM 3.13.1 the "Select Features" option does<br>
not work if the map-source type is set to "wfs" but will return results<br>
with the type set to "mapserver-wfs" and the typename set to<br>
"ms:qgis-layer-name".<br>
Using "mapserver-wfs" supplies a working solution for the initial<br>
GetFeature request, although I do see periodic "RequestNotWellFormed"<br>
exception from the server due to the "ms:" prefix.<br>
<br>
My diagnosis could be wrong, but it appears that the "mapserver-wfs" will<br>
trigger an assumed projection of EPSG:4326.<br>
With a type of "wfs" a getCode function is called that may be pointing to a<br>
"projection" library that is not packaged into geomoose.js and<br>
geomoose.min.js which results in an error.<br>
<br>
Unfortunately, the coordinates used in the results template, (for<br>
app.zoomToExtent), seem flipped and projected into EPSG:3857.<br>
<br>
For instance,<br>
Query by point is submitted to the WFS server as EPSG:4326, coordinates<br>
-81.93383567601884 41.02354686335107.<br>
The WFS reply for the feature bounding box is EPSG:4326, coordinates<br>
-81.934173,41.02333098 -81.93359651,41.02375282.<br>
The coordinates returned to the template are<br>
4566696.315337524,-16915358.3614889,4566743.27435152,-16914901.003045313<br>
<br>
I can flip the coordinates in the template when making the zoomToExtent<br>
call but have been unsuccessful in forcing zoomToExtent to use EPSG:3857 as<br>
the projection.<br>
"app.zoomToExtent([-16915358.3614889,4566696.315337524,-16914901.003045313,4566743.27435152],'EPSG:3857')"<br>
<br>
Am I missing or doing something incorrect?<br>
<br>
Thank you for any help.<br>
</blockquote></div></div>