[mapguide-users] RE: USE PRINT LAYOUT CODE

Walt Welton-Lair walt.welton-lair at autodesk.com
Mon Nov 20 18:03:57 EST 2006


The MgResourceIdentifier object identifies an *existing* resource on the
server.  It doesn't create one.

If you have access to Studio, I suggest you copy one of the print
layouts from the sample data set, modify it as necessary, and then try
your code again (using the appropriate library path to your updated
print layout).


-----Original Message-----
From: Joy Appler [mailto:jappler at my.bcit.ca] 
Sent: Monday, November 20, 2006 6:41 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] RE: USE PRINT LAYOUT CODE


  I belive we have created the necessary print layout resource by
creating it
in MGE Studio, and referencing it in the following lines of php code: 

$layout = null;   
    
if (array_key_exists('UseLayout', $_GET) && $_GET['UseLayout'] ==
'true')
    {

        $layoutRes = new
MgResourceIdentifier("Library://SGI_Print_Layout.PrintLayout");

        $layout =  new MgLayout($layoutRes, "gulfIslandsAlbersMap",
MgPageUnitsType::Inches);

    }

  Do you think this is done wrong?


Walt Welton-Lair wrote:
> 
> Have you created the necessary print layout resource?  I know MapGuide
> Studio lets you create them using an XML editor.
> 
> -----Original Message-----
> From: BradM [mailto:masonb at dfo-mpo.gc.ca] 
> Sent: Monday, November 20, 2006 5:56 PM
> To: users at mapguide.osgeo.org
> Subject: [mapguide-users] USE PRINT LAYOUT CODE
> 
> 
> If you have a moment, could you help find the code for using the 
> print layout function when plotting to DWF? We are using MGE. 
> 
> We can plot to DWF ok but we cannot use the function "use print
layout".
> 
> This function creates a nice legend in the dwf. 
> 
> Here is the error we get. 
> 
> Resource was not found: Library://SGI_Print_Layout.PrintLayout 
> 
> Resource was not found: Library://SGI_Print_Layout.PrintLayout
Exception
> 
> occurred in method MgResourceDefinitionManager.GetDocument at line 476
> in 
> file 
>
c:\build_tux_area\mgdev\server\src\services\resource\ResourceDefinitionM
> anag 
> er.cpp 
> 
> thanks! 
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/USE-PRINT-LAYOUT-CODE-tf2670252.html#a7446015
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: users-help at mapguide.osgeo.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: users-help at mapguide.osgeo.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/USE-PRINT-LAYOUT-CODE-tf2670252.html#a7446818
Sent from the MapGuide Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org






More information about the Mapguide_users mailing list