Posts Tagged ‘mapguide


Autodesk MapGuide 6.5 Retired But Still Downloadable

Here are the links to download MapGuide 6.5 Service Pack 1 (for now):

MapGuide ActiveX Control

MapGuide Author 6.5

MapGuide Server 6.5

MapGuide SDF Loader 6.5

MapGuide Raster Workshop 6.5

MapGuide Dynamic Authoring Toolkit 6.5

MapGuide Component Toolkit 6.5


Use at own risk as these products are no longer supported!  I have been continuing to consult with people to help move them to Autodesk Infrastructure Map Server 2014 or MapGuide Open Source – let me know if you need help migrating.



Autodesk Infrastructure Map Server – Auto-Zoom On Load

Whether you are using AIMS 2014 or MapGuide OpenSource 2.5, there is a way to automatically zoom and highlight objects.

I will do this demo using FUSION or Flexible Web Layouts.

We want to be able to pass parameters to the template like the following.


The parameters are:

  • KEY

The LAYERNAME is the layer name in the map (i.e. Roads)
The KEYNAME is the column you want to search by (i.e. ID)
The KEY is the comma delimited list of matches (i.e. 644,684)
The ISSTRING flag tells whether the KEYNAME is String or Number.

I am using the SLATE template in MapGuide/AIMS, found in C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2014\www\fusion\templates\mapguide\slate\index.html

To start the process, we need to trigger a javascript function once the map is loaded, around line 174, add a call to a function called zoomToObject()

var initPanelHandler = function() {
if(isTaskPaneRegistered) return;

Next create a zoomToObject() function that will pass all the parameters to a PHP Page to get the selectionXML, (paste this above the var showOverviewMap = function() { line):

function zoomToObject()
var mapWidget = Fusion.getMapById('Map');
var SESSION =mapWidget.aMaps[0].getSessionID();
var MAPNAME = mapWidget.aMaps[0].getMapName();

var KEY=getParam('KEY');
var ISSTRING=getParam('ISSTRING');
var KEYNAME=getParam('KEYNAME');

//The GETSELECTIONXML.php returns the XML of selected features.

var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp.readyState==4 && xmlhttp.status==200)
mapWidget.setSelection(xmlhttp.responseText, true);


we also need the getParam() function to harvest the parameters sent to the page:

function getParam(sname)
var params ="?")+1);
var sval = "";
params = params.split("&");
// split param and value into individual pieces
for (var i=0; i<params.length; i++)
temp = params[i].split("=");
if ( [temp[0]] == sname ) { sval = temp[1]; }
return sval;

Finally, the GETSELECTIONXML.php (I put this in the www folder of C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2014\www\)


$configFilePath = "C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2014\www\webconfig.ini";

$session = urldecode($_REQUEST["SESSION"]);
$mapName = urldecode($_REQUEST["MAPNAME"]);

$keyName = urldecode(stripslashes($_REQUEST["KEYNAME"]));
$layerName = urldecode(stripslashes($_REQUEST["LAYERNAME"]));
$isString = urldecode(stripslashes($_REQUEST["ISSTRING"]));

$key = urldecode(stripslashes($_REQUEST["KEY"]));

if($isString == true)
$key = $key . ',0';
$key = str_replace(",", "','", $key);
$key = "'" . $key . "'";



$userInfo = new MgUserInformation($session);

$siteConnection = new MgSiteConnection();


$featureService = $siteConnection->CreateService(2);

$resourceService = $siteConnection->CreateService(0);

$map = new MgMap($siteConnection);


$queryOptions = new MgFeatureQueryOptions();

$queryOptions->SetFilter($keyName . " in (" . $key . ")");

$layer = $map->GetLayers()->GetItem($layerName);

$parcelDataResId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$featureClassName = $layer->GetFeatureClassName();

$featureReader = $featureService->SelectFeatures($parcelDataResId, $featureClassName, $queryOptions);

$selection = new MgSelection($map);

$selection->AddFeatures($layer, $featureReader, 0);

$selectionXml = $selection->ToXml();

$selection->Save($resourceService, $map->GetName());

//dump the XML out to a JAVASCRIPT variable

echo $selectionXml;


catch (MgException $e)

echo $e->GetMessage();

echo $e->GetDetails();



That’s it.  It will work with the sample data that comes with MapGuide and AIMS, Sheboygan, or with any map you wish.

This will work with any FUSION application (flexible web layout),  on any version of mapguide.  The only thing you have to change is this line:

$configFilePath = “C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2014\www\webconfig.ini”;

Just point it to the correct www folder.



ContourGPS Video and MapGuide (AIMS 2012)

What is a ContourGPS camera?

A small light full HD video camera with GPS capabilities. The GPS adds speed, location and elevation to the picture. The GPS receiver automaps the three essentials up to four times per second. The GPS synchronizes with your video and displays a second by second replay via Google Maps, Bing or OpenStreetMaps.  All within the MapGuide/AIMS 2012 environment.

1. Upload Video and Associated GPS file to web server (code loads the GPS points into SQL Server and creates path in map).

2. Video list in Interface and choose video to watch.

3. Video plays and animated point follows the path in sync with the video.


Flow Arrows and Custom Linetypes in AIMS 2012 (aka MapGuide)

So a lot of people want to recreate the look and feel of the maps they created in AutoCAD, even though precise engineering drawings are not cartographically accurate.

That being said there is definely a way to recreate the flow arrows and Leaders from AutoCAD in AIMS.

If you have a line layer in AutoCAD you will either have to export it to SDF, SHP, Oracle Spatial, SQL Server Spatial, or any other “FDO” type data.

Connect to that data in AIMS and modify the layer style in AIMS 2012 Studio.

In the Style Lne dialog:

  1. Ensure to use “Map” units
  2. Chose your units (feet or meters typically)
  3. Under Symbol and Style, click Add Symbol.

 4. Under Select Symbol, choose Triangle.

5.  For height, type your height in feet or if you have it as a column in your data, choose that.

6. For width, do the same as step 5.

7. Click Advanced.

8. If you want to put an arrow at the beginning of the line, enter 0 for Offset from Start, do not type anything for “from end” and set the Repeat interval to 0.

9. For Rotation, enter: 90

If you change the Offset for the End to be 0 and the beginning empty, the arrow will appear at the other end of the line.
This is very effective for AutoCAD Leaders and Flow Arrows.  Also, you can use text instead of triangle, to get a custom line.
For example: Choosing Text instead of Triangle, you can repeat the text along the line to create a custom line time
The cool thing is you can do this in Map 3D 2012 as well, for any FDO based layer.
 Also, you can save as a .LAYER file, load back into AutoCAD Map 2011 and use the Publish to MapGuide to retro your advanced layer definition into MapGuide 2011.
 Normally you would have to hack around in XML to get this to work with MapGuide 2011.
 If you have Map 3D 2012 you can now create .LAYER files with all this neat stylization and use the .LAYER retroactively.

Dongjin Xing’s – Introduction to MapGuide Enterprise (circa MapGuide 2007) Programming

This Video was put on the Autodesk Developer Network (ADN) for MapGuide 2007 – it is a few years old, but it is a great introduction to programming with MapGuide in .NET.


Installing MapGuide Maestro on Mac OS X (MacBook Pro)

So I went to the download page for MapGuide Maestro and downloaded the Linux/Mac binaries:

And unzipped them to DOWNLOADS/MapGuideMaestro/  folder

The instructions said to run MONO.  Mono enables the .NET libraries on your Mac.  So I went to the site:

Downloaded the DMG for the Mono 2.6.4 – Intel Framework and installed Mono (defaults)

Now this is where it gets weird, I have to run TERMINAL to get it work.  This is like the DOS window in Windows (LINUX people know this environment well).

In Applications > Utilities > Terminal


  • cd //
  • cd downloads/MapGuideMaestro/
  • mono Maestro.exe

And MapGuide Maestro opens!

But, I don’t want run Terminal this each time I want to run Maestro, so I can use Mac Automator.

So, open Applications > Automator

  • Choose Workflow
  • Drag and drop “Run Shell Script” into the Workflow
  • In the shell, remove “cat”
  • Type:
    • cd //
    • cd downloads/MapGuideMaestro/
    • mono Maestro.exe
  • To create a link on the desktop to run Maestro, click File > Save As
  • For Save As, enter:  MapGuideMaestro
  • For Where, ensure Desktop is selected
  • For File Format, choose Application
  • Click Save

You now have a Link on the Desktop that will open MapGuide Maestro!  

The only issue I have seen is that the PREVIEW modes do not work (except for previewing Web Layouts)..


OpenLayers 2.9 Problem with MapGuide Enterprise 2010

So I have had some issues with this new roll-out of OpenLayers 2.9. My maps are just “brown” without the Google, Yahoo, Bing or OpenStreetMaps underneath.
I fixed it by using the 2.8 version:

< script src=””&gt;

this fixes everything…I haven’t figured out what has changed yet…


Autodesk MapGuide Enterprise 2010 Courseware

Hi, I thought I should post Autodesk’s MapGuide Enterprise Courseware and dataset…

Autodesk MapGuide 2010 Enterprise and Studio Essentials

Autodesk MapGuide 2010 Enterprise and Studio Essentials (data).exe


MapGuide Studio 2010 with 64 BIT

I recently found I could not install MapGuide Studio 2010 on 64 BIT.  Then I found a Knowledge Base Article at Autodesk. This mentioned CORFLAGS.exe.   I couldn’t find this anywhere. 

Here is how to install MapGuide Studio 2010.

  1. On the Autodesk MapGuide Enterprise 2010 DVD, browse to the “Autodesk\Autodesk MapGuide Enterprise 2010 Setup\Studio\” folder and double-click on the Setup.msi file.
  2. Download the .NET Framework 2.0 Software Development Kit (SDK) (x64)
  3. Browse to the “C:\Program Files\Microsoft.NET\SDK\v2.0.64bit\Bin\” and copy the CorFlags.exe file.
  4. Paste the CorFlags.exe file into your “C:\Program Files\Autodesk\MapGuideStudio2010\” folder.
  5. Click START >Run, type CMD and click OK.
  6. Using CD,  type CD Program Files (x86)\Autodesk\MapGuideStudio2010
  7. Finally, type: CorFlags Studio.exe /32BIT+

This will enable Autodesk MapGuide Studio 2010 on your 64 bit machine.



MapGuide Server 2010 License Suddenly Expires

I had a proper license using the Autodesk License Manager (ADLM) but suddenly my MapGuide Server said “Evaluation Copy Expired”…so here is how to fix it:


Here is a link with the solution to fix the issue.

You will need to modify your “serverconfig.ini” file, located in
“C:\Program Files\Autodesk\MapGuideEnterprise2009\Server\Bin” on your MapGuide Server.
Locate the following entries under the “General Properties” section in the file and add the following details…

The path to your network license file
LicenseServerPath = C:\Program Files\Autodesk Network License Manager\License\license.lic

The serial number of your software
SerialNumber = xxx-xxxxxxxx
(replace the x’s with your serial number)

Restart the MapGuide Server and all should be up and running again.

I didn’t know about this one…double entry anyone?

Gordon Luckett

Arrow Geomatics Inc's Gordon Luckett


gordon dot luckett at arrowgeo dot com 1-519-837-9500 (Arrow Geomatics Inc.)

Checkout MapGuide Guy’s Youtube Channel