On the Shoulders of Giants?

I was recently reading a post by Gordon Luckett about how he’s been able to use Google Maps and Bing layers in MapGuide / Fusion maps. This is only possible because the Fusion project decided to build on top of OpenLayers, and recent builds of Fusion have enabled the OpenLayers commercial base maps.

This got me to thinking about the amount of work that the MapGuide project is leveraging every time you see a map. MapGuide directly includes about a dozen open source libraries. Many of these (such as FDO, GDAL, GD and Fusion) have their own stack of libraries that they depend on. With a bit of digging, I quickly ended up over 30–I’m sure I could have gone further–and this doesn’t even count the open source utilities such as GCC, Ant and SWIG that are integral to turning all of this code into something you can use.

I guess what I’m trying to say is that no matter how cool your code is, you’re really just the tip of the iceberg. We’re not standing on the shoulders of giants, we’re standing on the shoulders of thousands of regular people who have dedicated their time to help build this ecosystem. We have to make sure that we in turn enhance other projects where possible, and provide a solid base for those who come to build on our work in the future.

-J

NanaimoMap Testers Wanted

The City of Nanaimo is launching our new MapGuide Open Source / Fusion based map in beta. I’d love to see some feedback from testers, and to get help generating some real-world usage patterns. You can only do so much with canned load tests.

If you’ve got a few minutes to play with it, please join us here:

NanaimoMap Beta

It’s in beta because of the issues that will likely be shaken out by more widespread use, and because we have not yet built out the layers and search functionality required to match our current MapGuide 6.5 ActiveX-based mapping portal CityMap. This will be completed before the end of the year.

Thanks!

-J

P.S. This application was developed by DM Solutions Group. We’re running Fusion 1.1 with the latest test build (r4114) of MapGuide. We wouldn’t have been able to launch–even in beta–without some last minute fixes by Trevor Wekel of OTX Systems and Haris Kurtagic of SL King. From a personal perspective, these guys are both amazing to work with, moderately priced for the value they offer, and are great resources if you’re stuck with a problem in MapGuide core that you can’t fix on your own. As always, the opinions offered on this blog are my own, not necessarily those of my employer.

MapGuide 2.1 Beta 1

Late last night, Tom announced the release of the first MapGuide 2.1 Beta.

Jackie Ng has a better description of this than I could write.

Apart from the improved scalability and stability of this release, I’m most excited about the WiX-based open source MSI installer that I got to work on alongside Jackie and Kenneth. Huge learning curve, but not having to count on Autodesk resources to build new installers should allow us to push new releases as needed. It also means that someone who understands the installer can easily create custom deployments for internal use.

Anyway, please give this beta a try. If you notice anything it’s not doing right, please let us know.

-J

Changing selection colour in MapGuide AJAX viewer

One of the annoyances that people have faced with MapGuide Open Source is that the selection colour was hard-coded in one of the C++ rendering functions. There were a few ways of getting around this without recompiling, but they were all a lot of work. RFC 38 included some code changes that made it possible to modify this value on the fly, but it doesn’t look like this capability was taken advantage of by the AJAX viewer that was distributed with MGOS 2.0.x.

If you’re using MapGuide Open Source 2.0 (2.0.2 recommended) and are not happy with the default blue selection colour, you can easily change it on a per-install basis by modifying the mapviewerajax template file. This is located at:

(INSTALLDIR)\WebServerExtensions\www\viewerfiles\ajaxmappane.templ

You will need to find the function called RequestMapImage, which includes a line that looks like this:


url = webAgent +
"?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&FORMAT=PNG&VERSION=1.0.0&SESSION="
+ sessionId + "&MAPNAME=" + encodeComponent(mapName)
+ "&SEQ=" + Math.random();

You will need to modify this to change the VERSION to 2.0.0, and add the BEHAVIOR and SELECTIONCOLOR parameters:


url = webAgent +
"?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&FORMAT=PNG&VERSION=2.0.0&SESSION="
+ sessionId + "&MAPNAME=" + encodeComponent(mapName)
+ "&SEQ=" + Math.random() + "&BEHAVIOR=7&SELECTIONCOLOR=FF5300FF";

Before:

After:

The BEHAVIOR parameter is a bitmask that controls what is rendered, and is described in RFC 38. The SELECTIONCOLOR parameter is a hex string in RGBA format, or its integer equivalent. Note for geeks: the A (opacity) portion of the string is ignored; the server code masks this out of the passed value, and then adds 200 (C8) as the line opacity and 160 (A0) as the fill opacity.

Note, the mapagent call allows you the flexibility to add more complicated behaviour to your viewer, such as changing the selection colour dynamically based on the map name, but I’ll leave that as an exercise for the reader (mostly because I’m lazy and use Fusion anyway and wouldn’t benefit from the work).

-J

CS-Map in MapGuide: Guess I was wrong

Earlier this week, I mentioned that GDAL might be beating MapGuide as an early adopter of the newly open-sourced CS-Map coordinate transformation library.

Well, this evening a new RFC was presented to the MapGuide project steering committee to replace PROJ.4 with CS-Map. Guess I was wrong about the beating part… but am still very happy about the joining :)

I’d imagine that this took a bit of work, but Autodesk MapGuide Enterprise has always used CS-Map, so most of the code was probably already sitting there waiting to go. I’m a little sad to see PROJ.4 replaced, and have some questions about compatibility with existing installs, but this has always been one of our pain points integrating MapGuide Open Source with other corporate applications (FME, Autodesk Map, etc) that used CS-Map. It will be great to see this problem go away.

-J