Tuesday, 15 January 2013

MapGuide Open Source 2.5: What's new

So for those who downloaded and installed the preview release, here's what's new in MapGuide Open Source 2.5

FDO 3.8

MapGuide Open Source 2.5 uses FDO 3.8 which contains some key improvements and fixes:

New Google Street View Fusion widget

The Fusion that comes with MapGuide Open Source 2.5 now includes a new Google Street View widget, allowing Google Street View to be used within a Fusion Flexible Layout

Using the latest beta of Maestro, here's how you can use this widget in your Flexible Layouts.

Firstly, create or open a Flexible Layout. Set up your Map Definition (which must be in WGS84.PseudoMercator), add one or more Google commercial layers (this is a TOS requirement for using the Google Street View service)

Then in the widgets section of the Fusion editor, click the widget management button (indicated by the cog icon)

Then in the widget management dialog, click Add to add a new widget to the widget set

Pick the new GoogleStreetViewer widget type and give it a name

Optionally, you can then edit the XML of this widget to change any widget parameters

Close the dialog. Then in the widgets section of the Fusion editor select a root container from the tree view and then add a new widget.

Pick the widget that we just registered and it will be added to your selected root container

Now if you preview the layout, you'll see the new Google Street View widget

Click it, and you'll see a camera icon indicating the current street view position, with the actual street view viewport situated in the Task Pane.

Now as you can see from the warning bar, the street view camera currently sees nothing because most likely it is not situated over a road or street, so you can drag and rotate the camera icon on to an actual road to then be able to see the street view from the Task Pane

To ensure TOS compliance, this widget will only work in the presence of an active Google base layer. Turning off the active Google layer (or switching to a non-Google base layer), will throw back an alert like this:

Make sure you understand the Google Maps TOS before using this widget. With great power comes great (legal) responsibility!

QuickPlot PDF output

The QuickPlot widget in Fusion now outputs to PDF for better printing control

Note that QuickPlot for the AJAX viewer is still image-based, and you will have to a manual customization job to backport such functionality to the AJAX viewer.

AJAX Viewer improvements

That's not to say that the AJAX Viewer has been neglected for this release. Thanks to contributions by Bruno Scott, the AJAX Viewer has some new features as well.

The legend now has a context menu option to toggle legend visibility of all layers

The layers that are not currently visible at the current scale will be greyed out

For tiled maps, the scale field on the status bar converts to a convenient drop down of the map's finite scales allowing for easy zooming

Streamed HTTP feature/data/SQL query results

If you've ever used the SELECTFEATURES, SELECTAGGREGATES or EXECUTESQLQUERY mapagent operations (if you ever previewed data using the Local Feature Source Preview in Maestro, it uses these operations), you might notice that for large query results, the memory usage is absolutely woeful. Just to give an example, a full query result of the Sheboygan parcels in 2.4 or older served over HTTP consumes the following amount of memory during the request:

  • XML: ~50MB
  • JSON: ~1.5GB (!!!)
This is because the XML of the full 17k parcel features is internally buffered up-front before being written out to the HTTP response. The JSON result is even worse because we not only maintain a full internal XML string buffer, but also an internal DOM for the purposes of converting to JSON.

And this is just one request! Obviously, MapGuide 2.4 or older is not suitable as a platform for serving data with this woefully inefficient query response processing.

So we've fixed that for this release. Through a combination of HTTP chunked encoding and outputting the response as we iterate through the query results, the same query in 2.5 now consumes the following amount of memory during the request:
  • XML: ~500KB
  • JSON: ~2MB
Which for those watching at home is 100 times improved memory efficiency for XML output and 560 times improved memory efficiency for JSON output. Of course this is just one test case, your mileage may vary depending on query, but the memory efficiency improvements will be most apparent for really large query results.

New Enhanced Java API

For 2.5, we're including a new enhanced Java wrapper API that provides the following benefits and enhancements over the current Java API:
This enhanced Java API is made available in 2.5 as a "developer preview" option. The current Java API is still there (the Java AJAX viewer still uses it), and will continue to exist for a few more releases before we decide if/when to pull the plug on the current crufty Java API. If you are building a new Java MapGuide application, consider giving the enhanced Java API a go. It will be a much more pleasant development experience.

Integrated API documentation

The Java API enhancement work also yielded additional improvements in API documentation. The Java and .net wrapper APIs now include the translated doxygen API documentation fragments to javadoc and .net XML doc respectively, allowing for such documentation to be visible from within an IDE

This enhancement work renders obsolete the previous .net-only method of transplanting API documentation as this can work with both Java and .net.

For PHP, you're out of luck and will still have to use the web-based API documentation as there is no official standard for documenting PHP code that can be consumed in a PHP IDE. If there is a standard, I haven't heard of it.

Support for user-defined coordinate system dictionaries

Probably not that important for regular users (CS-Map supports thousands of coordinate systems out of the box), but MapGuide now supports user-defined coordinate systems dictionary files allowing for the sharing and consumption of custom user-defined coordinate systems. Check the CS-Map RFC for all the details.


נמרוד כנען said...

We are grateful for your feeds. When do you think this version will be released ?

Jackie Ng said...

Check the 2.5 milestone page on the wiki