Tuesday, 8 October 2013

MapGuide 2.6 feature showcase: Fusion

Since the 2.6 preview release bundles a trunk build of Fusion, I might as well cover what's new in Fusion in addition to a whole bunch of bug fixes and minor improvements.

OpenLayers upgraded to 2.12

OpenLayers has been upgraded to the 2.12 release. This gives Fusion plenty of new toys to play with.
  • Client-zoom. If you have a Map Definition with an OpenStreetMap backdrop, the OpenStreetMap tiles will stretch appropriately if you zoom to an unsupported OSM scale

  • Improved touch support for mobile devices. Try viewing your Fusion layout on an iOS or Android device. Not that we're going to officially support Fusion for mobile devices (my recommendation is to still build a dedicated viewer or use an existing mobile-optimized viewer for mobile devices), but you might be surprised to find that the Fusion is quite serviceable on tablets/phones due to the improvements provided by OpenLayers 2.12.
  • Cleaner custom build experience. As a result of the OpenLayers upgrade, we've also took the opportunity to restructure how we keep OpenLayers under version control. Now we also keep any customizations to OpenLayers under a separate directory so that creating your own custom build of OpenLayers for Fusion is a case of extracting the 2.12 release to a temp directory, overlaying our modified files on top and then building a new OpenLayers.js which can then be incorporated into the Fusion installation
Time/resources permitting, we may look to bump this to the latest stable (2.13.1)

New Geolocation widget

The Geolocation widget taps into the new HTML5 geolocation API allowing you to pan (and optionally zoom) to your current position on the map.

Of course, the utility of this widget is somewhat diminished if you (the user) are nowhere physically within the area of the map you're looking at (like myself, based in Melbourne, Australia looking at a map of Sheboygan, Wisconsin, USA). The widget will warn you if your physical location is outside the bounds of the map.

New Coordinate Tracker widget

The Coordinate Tracker widget allows you to view your current mouse coordinates in various different coordinate systems.

Unlike MapGuide, we're leveraging Proj4js to do these transformations (because CS-Map is not available for us to use in JavaScript), and we also keep a pretty big list of coordinate systems that are convertible between CS-Map and proj4 to ensure maximum compatibility of most coordinate systems.

Improved Load/Selection performance

If you're working with a version of MapGuide that supports the new CREATERUNTIMEMAP and QUERYMAPFEATURES operations (ie. The 2.6 Preview Release), you should see improvements in map loading and selection. For large maps, you should see significant loading improvements.

Otherwise we stick to the existing set of PHP web tier glue for doing map loading/selection.

Redline Enhancements

The Redline widget also sees continued improvements

Firstly, the redline widget now supports Advanced Stylization. In terms of what you see on the map, it shouldn't be much different visually from Basic Stylization except that labels you include with drawn redline objects will always be visible regardless of scale. Previously, under Basic Stylization feature labels were subjected to "MapGuide knows best" label placement which is not a good thing to have when you've made some notes on the map and you can't see the actual notes!

The lines actually have labels too, but "MapGuide knows best" label placement has determined that it can't find a suitable place to draw a label. Point styles under basic stylization had an option to override this behaviour, to always draw the label regardless. Unfortunately, line or area styles do not have an equivalent setting.

Moving to Advanced Stylization gives us this capability for all geometry style types.

As you can see, all the labels are now visible even if not packed nicely. But at least this way, you know for certain visually whether a redline feature has labels or not.

But this is not to say we've removed basic stylization support. You can choose what type of stylization to use through the new StylizationType widget extension property.

Secondly, we've continued to improve the user workflow and continue to reduce the amount of setup steps a user needs to take. You can now specify the desired redline data store format and geometry types upfront as widget extension properties. Having these properties set turns the main redline from this

To this

No need for the user to have to choose (he/she probably has no clue). Just click the big button to start.

Thirdly, we've improved the redline editing process. The redline list box is now multi-selectable, meaning you can now select/delete/edit text of multiple redline objects at once instead of doing it one-by-one

QuickPlot Enhancements

The QuickPlot widget now supports legends. The legend is produced through the existing GETMAPLEGENDIMAGE operation.

Also the QuickPlot UI lets you configure which elements you want to show in the final PDF plot.

Try it now

If you can't install the MapGuide 2.6 preview release, we've made available a trunk snapshot of Fusion for you to download and try out.

Just extract the zip or tarball to the www directory of your MapGuide web tier installation. If you want a side-by-side install without replacing the current Fusion, just rename one of the fusion directories and change the "fusion" in your viewer URL to this renamed directory as well.

This snapshot includes the 5 MapGuide templates and is newer than the Fusion that is bundled with the MapGuide 2.6 preview release.

MapGuide Open Source 2.4.1 and newer are the versions of MapGuide that will work with this release. Versions older than 2.4.1 are un-tested and aren't guaranteed to work.


David said...


Just a quick reminder for anyone testing this preview that the "fusion/common/browserdetect.js" included in this release needs to be updated to correctly detect IE version 10 or higher.

1. Download and unzip "fusion-2.6.0-preview" from this post.
2. Download the fixed "browserdetect.js" from http://trac.osgeo.org/mapguide/ticket/2109

santosbj said...


Can you helpme with a problem, connecting to a database SQl Server Spatial?...

when I connect to mapguide with a restricted user, who is not the owner and access to tables only required access (F_ * tables and tables with geometries), I get the following error sporadically

An exception occurred in FDO component. Error occurred in Feature Source (Library://G-OASIS/Data/SqlServerSpatial.FeatureSource): RDBMS: [Microsoft][SQL Server Native Client 10.0][SQL Server]The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'. (Cause: , Root Cause: RDBMS: [Microsoft][SQL Server Native Client 10.0][SQL Server]The SELECT permission was denied on the object 'sql_expression_dependencies', database 'mssqlsystemresource', schema 'sys'.

which are the privileges we required minimal user?..