Saturday, 9 September 2017

Not all quiet on the MapGuide Maestro front

Just because MapGuide Maestro is a windows-only .net application does not mean the Maestro API driving it (and your own custom MapGuide applications using the Maestro API) need to bear the same platform constraint.

We have .net Core to run .net code cross-platform. We have .net standard as a specification for building truly cross-platform .net class libraries. The API surface used by the MaestroAPI highly intersects with what is provided by .net standard. All the signs say that we have the means to make MaestroAPI a truly cross-platform .net standard compatible class library, and that we should probably do it.

So since the last release, my main focus has been to port the Maestro API to target .net standard 2.0, thus expanding its potential reach beyond full .net Framework on windows.

It is most encouraging to see this on a Linux terminal after all this effort.



The tale of getting to this point is worthy of a blog post itself. The internet could do with more .net standard porting stories.

Friday, 8 September 2017

Announcing: mapguide-react-layout 0.10

Here's a new release of mapguide-react-layout with a metric bucketload of new features.

QuickPlot now feature complete

As blogged previously, the final missing piece of the QuickPlot (capture box rotation) has been implemented, bringing this component to feature parity with the Fusion original. The rotation being controlled through a new numerical slider in the QuickPlot UI


Selection Panel sub-selection

Through creative use of QUERYMAPFEATURES, the Selection Panel can now support highlighting selected features within a selection set. Useful for visually sifting through big selections.



Persistent Load Indicator

A user raised a very valid point that if you don't have the navigator (aka. Zoom slider) active, there is no actual load indicator visible as the only place we have a load indicator is on the navigator component itself.

This release adds a persistent load indicator that is represented by a thin blue animated bar at the top.

Blink and you might miss it in the GIF below.


Coordinate Tracker

This release includes the missing Coordinate Tracker widget.


Init Warnings

Any warnings that we encounter during viewer initialization are now collected and displayed at the end. Here's some warnings that could be shown.



API enhancements

  • NPM module: Now supports custom redux application state and reducers. Check out the updated example to see how this is done.
  • NPM module: Selection Panel supports custom rendering of the body when a selected feature is to be displayed (if you don't like the default table-based attribute display)
  • NPM module: There is now a flat "mapguide-react-layout" module where you can import everything from, instead of having to import everything piecemeal.
  • Browser Globals: You can now specify locale as a mount option
  • Browser Globals: You can now specify a post-init hook function as a mount option
  • Browser Globals: Redux getState and dispatch functions exposed through MapGuide.Application class
  • Browser Globals: All dispatchable redux actions available under MapGuide.Actions namespace
  • Browser Globals: You can now retrieve and invoke registered commands through getCommand()
Other Changes
  • OpenLayers updated to 4.3.2
  • Blueprint updated to 1.27
  • Now built with TypeScript 2.5
  • Removed es6-promise from the viewer bundle. All template HTML files script include the es6-promise polyfill separately so that the viewer will continue to work in Internet Explorer
  • Ported across the view size status bar component
  • Full extension property support for the CursorPosition widget


Project Home Page
Download
mapguide-react-layout on npm

Monday, 28 August 2017

React-ing to the need for a modern MapGuide viewer (Part 19): Highlighting selected features

When I was implementing the Selection Panel for mapguide-react-layout, this super-ancient Fusion ticket was on the back of my mind as being able to highlight selected features is a very useful feature to have.

Whereas I didn't really have an idea how this would be done in Fusion, for mapguide-react-layout I had an idea how this would be done.

The trick is to use the v2.6 QUERYMAPFEATURES operation with the following parameters:

  • REQUESTDATA=2 (asking for inline selection image only)
  • LAYERATTRIBUTEFILTER=0 (so that selection is not constrained by layer selectability and our current view)
  • FEATUREFILTER=(the selection XML sub-fragment that represents the selected feature)
  • PERSIST=0 (the most important parameter. We want this operation to not alter the selection set)
Once the QUERYMAPFEATURES operation is sent and we get a response, the key is to be able to line up the inline selection image (data URI) with the current map. To handle this part, we use an OL static image source to store the inline selection image.

When all the pieces are brought together, we finally have the ability to highlight selected features.


This will be in the next release of mapguide-react-layout.

Thursday, 10 August 2017

React-ing to the need for a modern MapGuide viewer (Part 18): Restoring the Quick Plot capture box

If you've been playing with mapguide-react-layout, you'll no doubt have noticed a glaring omission in the ported Quick Plot component.

The interactive map capture box.


Porting across the capture box sounded mostly simple:

  • Manage the temporary OL vector layer containing the capture box.
  • Attach an OL translate interaction so the capture box feature can be easily moved around by dragging the box around.
  • Auto-update box geometry based on change in paper size / orientation / scale
There was just one technical hurdle: Rotating the box.

For the longest time, I was wracking my brain figuring out how to replace the rotation "grip handle" using the new OpenLayers APIs and I couldn't figure it out. The APIs were there to rotate feature geometry. I heard about ol-rotate-feature and gave it a try, but I couldn't grasp how that interaction actually rotates features.

So I went back to the mental drawing board. OpenLayers has APIs to rotate features, so what we really just need was an intuitive UI input to enter the box rotation. If I couldn't figure out how to replicate the rotation "grip handle", then the next best thing was ... a numerical slider.

And with that, the missing piece was found and I was finally able to port over the final piece of functionality of the original Fusion QuickPlot widget.


In the above GIF, you might have noticed a message flash by.


This is merely a simple countermeasure against the fact that with current OpenLayers, you can rotate the map as well. So rather than deal with number crunching 2 sets of rotations, it is easier to just reset the rotation on the map and prevent the ability to rotate the map while the map capture box is active.

And with that, our Quick Plot component has reached feature parity with the original Fusion widget.

This (newly feature parity) Quick Plot will be available in the next release of mapguide-react-layout, whenever I decide that will be.

Wednesday, 2 August 2017

Announcing: mapguide-react-layout 0.9.6

This is a quick release to make the awesome new layer transparency sliders in the previous release not break down when used on a map that doesn't actually have external base layers (OSM, Bing, etc)

Project Home Page
Download
mapguide-react-layout on npm

Thursday, 27 July 2017

Announcing: mapguide-react-layout 0.9.5

This was originally going to be versioned 0.9.2, but the volume of changes was too big to be a bugfix-level single patch version bump, but at the same time, it was also not enough to warrant a minor version bump, so I decided to go half way with 0.9.5.

Here's what's new in this release.

Toggle-able Layer Transparency

The viewer options UI is now fleshed out to allow you to toggle transparency of:

  • The MapGuide map (and any tiled layer groups)
  • The MapGuide selection overlay
  • External Base Layers
To illustrate this, here's a self-explanatory GIF



This allows one to easily compare the MapGuide map against its base layer backdrops without requiring actual visibility toggling.

And yes, this works even on IE (11, the only version I care to support)

Sprite Icon Support

This release now supports the standard Fusion icon sprite. This will no longer load the individual icons for commands and widgets if it is clear they are referencing the standard icon sprite.


Targeted Command Support

If a command or widget requires execution in a New Window or a specific frame, the viewer will now support it. Note that if a command or widget is set to execute in a New Window, we won't actually spawn a new physical browser window, we'll run it in an iframe inside a BlueprintJS dialog component instead.

Other Changes/Fixes
  • Added support for extension properties for Buffer, FeatureInfo, Query, Search, SelectWithin, Theme.
  • Fixed Fusion MapMessage bar emulation
  • Fixed tooltip queries not being sent with pixel-buffered polygon geometries
  • Fixed zoom requests not snapping the scale to the closest finite list if viewing a tiled map
  • Legend now properly renders layers with multiple geometry styles
  • Fix excessive BlueprintJS toaster components being created and not cleaned up
  • Fix flyout menus requiring double-click to re-open (after clicking a menu item inside the first time)

Friday, 21 July 2017

So ... where's MapGuide Open Source 3.2?

Here's the story, since I gather not everyone reads the mapguide-users mailing list where I mentioned this subject many months ago.

I've decided (many months ago) to skip on making this release.

The differences between 3.1 and (a 3.2 release if I had decided to make one) is so small that it isn't worth investing the build resources on a 3.2 release cycle.

Since I'm skipping on a 3.2 release, it means that we have a good year-long window of solid development time to get some compelling features into the release after it (currently set as 3.3). Some of this development work is already starting to bear fruit.

Now that's not to say there isn't going to be a MapGuide release sometime between now and when 3.3 is out. I still do hope to put out the (hinted previously) patch releases for MGOS 2.6, 3.0 and 3.1 in between, but that requires me rebuilding my build infrastructure first and that is currently taking a back seat to landing some solid features into 3.3 first, so that's where things are at.

And as always. As these features land, you can expect this blog to talk about it.