Thursday, 28 November 2013

Better Fusion errors

So I'm currently hacking on Fusion to make it try and give us errors (if any occur) that actually mean something instead of a wall-of-gibberish that's alert()'ed out.

Now this is an error in Fusion that actually contains useful information!

And if you're wondering how useful that above error was, it told me that the CreateSession.php helper script had some syntactical compatibility issues for PHP 5.5, something that obviously slipped under the radar when I was upgrading PHP and assorted PHP code for the next release of MapGuide Open Source.

So in the process of building this feature, it immediately went straight to work and caught some server-side problem that would've taken several debug cycles to dig out. And I didn't even have to break into Firebug/Developer Tools to get this information! I'm loving the taste of this dogfood already!

Tuesday, 26 November 2013

Another cool upcoming Maestro feature

The next version of Maestro (I have decided) will be version 5.1

I've already shown one cool feature that will be in this release. Here's another cool feature that just landed in trunk.

To illustrate this, here's the Map Definition in the current stable 5.0.1 release.

If you have a Map Definition of say 100+ layers, and you want to make the majority of them un-selectable, there's going to be a lot of clicking around different layers and un-ticking the selectable checkbox for that layer. Not very efficient from a usability standpoint.

You could currently take advantage of scripting to automate this task, but this usability deficiency is something worth fixing in the application itself.

So how did we solve this? Meet the revised Map Definition editor.

We now use a WinForms PropertyGrid component to represent the checkable/boolean layer properties. Why a PropertyGrid? Because the PropertyGrid has this special unique feature of being able to automagically edit not only properties of any object, but also be able to edit properties of an array of objects!

Meaning, we can now do things like batch edit the selectability of multiple selected layers

What about heterogeneous selections of groups and layers? No problem.

Due to the magic of the PropertyGrid, only the properties in common between the selected objects are presented in the grid for editing. Groups do not have a selectability setting, so this property has been omitted.

With this new feature in place, batch editing of common layer/group properties is now much simpler and faster.

Friday, 15 November 2013

FDO Toolbox has moved

FDO Toolbox has moved to github.

The removal of downloads from Google Code was the last straw. Github having support for releases was enough to convince me to make the move.

Still got to migrate assorted content from the Google Code site, but the source code is all there now.

I'll still be sticking to my update-on-every-new-release-of-FDO plan, but now that the code is on github you can get into the open source spirit by forking the repo, hacking on the code, and sending me some nice pull requests :)

Thursday, 7 November 2013

MapGuide tidbits: MgConnectionFailedException

Here's another one for the newbies

If you can't connect to MapGuide with Maestro

Or you're getting a message like this when you run your MapGuide application

It means your Web Tier to Server Tier connectivity is broken. Or to explain visually

MapGuide is a 3-tier system. When you're "connecting to a MapGuide Server", you are asking the Web Tier middleman to ask the Server Tier to do something (render a map, query a Feature Source, read an XML resource, etc, etc). If this Web Tier <-> Server Tier connectivity is broken, then the Web Tier is unable to forward any commands or operations to the MapGuide Server, hence it throws this error message back to the client application.

So what is the resolution for this? Simply restarting the MapGuide Server is enough to re-establish this broken connection.

Why did the MapGuide Server go down? Analyzing MapGuide's various log files may give you a clue as to why it went down.

On the other hand, what if you try to restart the MapGuide Server and it doesn't come back up? This is where it helps to run the MapGuide Server in interactive mode. To run the MapGuide Server in interactive mode, go to the directory where the MapGuide Server executable is located (generally C:\Program Files\OSGeo\MapGuide\Server\bin on windows and /usr/local/mapguideopensource-x.y.z/Server/bin on Linux where x.y.z is your MapGuide version number), and run the following from the command line

On Windows:
mgserver.exe run
On Linux:

If something is preventing MapGuide Server from starting up, it will most likely spit out some error message about it to the command-line 99% of the time. This should give you more information to work with.