For the longest time, MapGuide’s support for WFS and WMS was nothing too special. The level of support was the bare-minimum enough so that we could say “We support WFS/WMS”
For MapGuide 4.0, the WFS and WMS support has been enhanced in the following areas:
GeoJSON format support
As I’ve previously mentioned, if we’re going to serve feature data in a JSON format, we should just go straight to GeoJSON and not bother with anything else.
This now also applies for WFS and WMS operations that return feature data. Namely:
GetFeatures for WFS
GetFeatureInfo for WMS
For both these operations, specifying application/json as the requested format will return the data in GeoJSON. This support is most useful for WMS GetFeatureInfo as due to the ubiquity of GeoJSON support, a WMS GetFeatureInfo response in GeoJSON format can be used as a convenient “selection overlay” to display selected features when clicking on a WMS map.
Configurable geometry output for WMS GetFeatureInfo
Sometimes, one may not wish to have geometry output for certain WMS GetFeatureInfo requests. So for MapGuide 4.0, there is a new _EnableGeometry metadata option for Layer Definition resources, that determines if WMS GetFeatureInfo requests against this layer should return geometry data or not.
The next release of MapGuide Maestro lets you toggle this setting in the UI without having to mess around with resource header XML.
This setting is only applicable if the Layer Definition itself has been set to be queryable for WMS.
WFS Support for hit count
The spec for WFS GetFeatures defines a special mode where one can request a hit count (ie. A raw total) instead of the actual raw feature data. MapGuide did not implement this part of the WFS spec (it is optional). For MapGuide 4.0, this is now implemented.
If you pass resultType=hits to your WFS request, you now get a total instead of the feature data.
As an aside, if you use VSCode on the regular, I highly recommend you install the REST client extension. It has replaced Postman for my HTTP/REST API testing. As evidenced by the above screenshot, testing HTTP requests is dead simple.
Special thanks to OpenSpatial for their assistance in testing out this feature.
Viewer representation for WMS GetMap
As of the 4.0 preview 2 release, the mapagent now also supports a new viewer representation for WMS layers, giving you a built-in way to easily preview any published WMS layer in MapGuide by simply specifying a format of application/openlayers, which is a new option in the GetMap test page
In this format, a HTML page is returned which contains an OpenLayers viewer set up to the WMS layer(s) in question.
No more needing to fire up a client GIS application like Gaia or QGIS to preview such layers, MapGuide now provides the means to preview such layers out of the box!
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
More Stories
Facebook Fact-Checker CENSORS Heritage Video Quoting Biden’s Own Words on Gas Policy – March 19, 2022 at 06:49PM
General Mills (GIS) Gains But Lags Market: What You Should Know
CAD Designer