[mapguide-internals] Mapguide 6.5 help

Andy Morsell amorsell at spatialgis.com
Thu Apr 24 14:03:12 EDT 2008


This question should be posted and researched on the Autodesk MapGuide 6.5
groups, as Jason mentioned.  But, with some experience with this, you will
most likely have a difficult time accomplishing all that you want.  You can
do some things with the print layout, but it's somewhat limited.  Take a
look in the MG6.5 API documentation at the MgPrintLayout object.  Here's an
example of what it takes to add a simple disclaimer to a print-out.  You may
want to consider switching to MapGuide Open Source or Enterprise in the near
future ...... Also, please don't post any replies back to this list.
Thanks.

function onEndLayout (layout,printInfo) 
{ 
//Note that all extent coordinates reference the upper-left corner as the
origin
//assign disclaimer image properties (in inches)
var disclaimWidth = 4;
var disclaimHeight = 1;
var disclaimXoff = 0.2;			//offset from left margin
var disclaimYoff = 1.2;			//offset of top of image from page
bottom

var pixelsPerInch = printInfo.getPageResolution(); 
var pageExt = printInfo.getPageExtent(); 
var mapEle = layout.getPageElement("mg_map"); 
var legendEle = layout.getPageElement("mg_legend"); 
var scaleEle = layout.getPageElement("mg_scalebar");

var disclaimEle = layout.addSymbol("disclaimer"); 		//disclaimer
is as an API symbol defined in the MWF file
var disclaimExt = disclaimEle.getExtent(); 
var disclaimMinX = disclaimXoff*pixelsPerInch;
var disclaimMinY = pageExt.getMaxY()-disclaimYoff*pixelsPerInch;
var disclaimMaxX = disclaimMinX + disclaimWidth*pixelsPerInch;
var disclaimMaxY =
pageExt.getMaxY()-(disclaimYoff-disclaimHeight)*pixelsPerInch;
disclaimExt.set(disclaimMinX,disclaimMinY,disclaimMaxX,disclaimMaxY);
disclaimEle.setExtent(disclaimExt); 

//if the paper layout is landscape, the scalebar needs to be pushed over to
the right a little bit
if (pageExt.getMaxY() < pageExt.getMaxX())
	{
		scaleExt = scaleEle.getExtent();
		scaleExt.set(disclaimMaxX - 0.2 *
pixelsPerInch,scaleExt.getMinY(),disclaimMaxX +
(scaleExt.getMaxX()-scaleExt.getMinX()),scaleExt.getMaxY());
		scaleEle.setExtent(scaleExt);
	}

}


Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Samuel
Lucena
Sent: Thursday, April 24, 2008 10:51 AM
To: 'MapGuide Internals Mail List'
Subject: [mapguide-internals] Mapguide 6.5 help

I do not know if I can take this forum doubts concerning MG6.5. but I will
leave my question.

I have a system running on ASP with MG6.5 but I am with a question-print
maps. until today only know something like fazeR shows the link below:

http://img111.imageshack.us/my.php?image=68356769mo6.jpg

There is how to do something more with more information, size A0, A1, A2, A4
with information from the company, scale, date, etc.. as shown below:

http://img57.imageshack.us/my.php?image=89957984an8.jpg

Sorry my english.

Tks




Samuel Callou de Lucena

______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals




More information about the mapguide-internals mailing list