Friday, 4 March 2022

Announcing: mapguide-react-layout 0.14.7

This release updates OpenLayers to the latest version 6.13 and includes the following changes/fixes:

  • Un-break support for Web Layout resources
  • Use DOMPurify to sanitize all possible manually constructed HTML content. DOMPurify is now also the default HTML cleaning function for the selection panel if no custom HTML cleaning function is specified.
The last release was 0.14.5. What happened to 0.14.6?

The 0.14.6 release was pushed shortly before this announcement and was found to carry a vulnerable version of a package (shortid) that we no longer use. This release (0.14.7) was made shortly after to remove this dependency.

Thursday, 3 March 2022

Announcing: vscode-map-preview 0.5.9

This update tidies up the feature popup display so that overly long name and values are now ellipsized


The original un-ellipsized content is available as a mouseover tooltip


Although I couldn't verify it, the name and content values are now also sanitized with DOMPurify to guard against any potential XSS shenanigans.

This update also includes an updated OpenLayers (6.13.0)

Wednesday, 29 December 2021

Announcing: mapguide-react-layout 0.14.5

 To cap off this year, here's one last release of mapguide-react-layout that includes the following changes:


Wednesday, 15 December 2021

MapGuide and log4shell

The log4shell vulnerability has been making the rounds across the tech space and since MapGuide has Java support, I did a check of our MGOS 3.1.2 and current 4.0 preview installation layouts to see if MapGuide is affected.

MapGuide's Java support comes in the form of:

  • Bundling the Apache Tomcat web server
  • Providing a Java language binding to the MapGuide API in the form of a consumable jar archive.
None of these components carry log4j as a dependency. No log4j jar archives are present in any MGOS installation.

Therefore, you are not affected by log4shell. Everything is good!

Naturally, if your Java-based MapGuide application running on top carries the log4j dependency, you should check if the version you're consuming is affected by log4shell and upgrade that dependency to a non-vulnerable version.

Tuesday, 14 December 2021

All API code samples should be written as interactive notebooks!

Consider this hypothetical if you will.

What if instead of our current static API documentation for MapGuide Maestro, we delivered API documentation as a series of .net interactive notebook documents? Code examples that are not only editable, but also interactive!

Behold! A .net interactive notebook explaining how how to use the Maestro API to render an image of a map.


Want to try this code sample yourself? In addition to having MapGuide Open Source installed locally, you will need Visual Studio Code and the .NET Interactive Notebooks extension installed. Once both are installed, you can download this interactive notebook and save it with a .dib extension. Once downloaded, open the .dib file in VSCode and you can run and play around with the code just like the video above.

I believe this is a game-changer for writing API documentation. I have had the same revelation with interactive notebooks for API documentation as I did with the discovery of storybook for designing, developing and showcasing React components. With tools like this, you are actively incentivized to maintain your API docs and its a win-win for your (developer) userbase who get better quality API docs in the process.

The "killer app" for me is if there was a way to either:

  • Self-host these interactive notebooks on a asp.net core application
  • Export these interactive notebooks to blazor WASM so it can be hosted as static web content on something like GitHub pages
Because right now you need specific tools to consume these interactive notebooks. The tipping point  for me will be if you can consume these interactive notebooks straight from your web browser!

Friday, 12 November 2021

Announcing: mapguide-react-layout 0.14.4

This release improves upon the 0.14.3 release with the following fixes and changes:

  • The hover highlighting of vector layer features will now only happen if the active map tool is the select tool.
  • Fix viewer init of an appdef with static image layers
  • Fix support for Map Definitions using arbitrary coordinate systems whose units are not in meters.
  • Fix ability to add GeoJSON layers for some WFS services
  • A GeoJSON appdef layer can now source data from a browser global variable
  • WFS is now supported as an appdef external layer

Saturday, 30 October 2021

Announcing: mapguide-react-layout 0.14.3

This release improves upon the 0.14.2 release with the following changes:

The viewer now supports static images as a subject layer in an application definition JSON document. This allows the viewer to display any arbitrary image, allowing one to display "maps" that have no real-world geographic basis. For example, you can now use the viewer to view the fictional map of Los Santos


Or if fantasy is your thing, maybe a map of Middle Earth


Because static image layers have no real-world geographic basis, it is incompatible with layers and widgets that assume your map is based on a real-world coordinate system, so things such as:

  • XYZ, OSM or Bing Maps Layers
  • Coordinate Tracker widget
Will not work with static image layers and will be disabled if you load in an appdef document that has a static layer and one or more of these layers/widgets specified. A viewer static image subject layer will also be operating in stateless mode, so all the caveats and limitations of stateless mode also apply.

On the same topic, the viewer now also supports MapGuide Map Definitions based on arbitrary unit coordinate systems. Map Definitions based on arbitrary coordinate systems are typically things like internal building floor plans or maps whose layers are sourced from non-georeferenced CAD drawings. Again, the same limitations as static image subject layers apply (no XYZ/OSM/Bing backdrops, etc, etc)

For this release we've also extracted the layout-template-specific CSS out to their respective stylesheets. This means that the HTML content for all the viewer template files are now 99% identical with the difference being the template stylesheet reference and the template name to init the viewer with.

The HTML is such that you could now conceivably create a server-side wrapper that can generate the viewer HTML for any template given the name of the template to use. This release includes a new optional index.php entry point that pretty much demonstrates this idea. The index.php entry point takes a template query string parameter in addition to all the other query string parameters and will render out the viewer in your chosen template.

This release also fixes the following issues:
  • Init warnings now display again on startup
  • Transparency is now properly applied for non-MapGuide subject layers