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

No comments: