[mapguide-users] Custom layouts...

Andy Morsell amorsell at spatialgis.com
Wed Mar 22 12:39:32 EST 2006


I second that, thanks very much Alain.  Example code is one of the most
valuable tools for developers.
 

Andy 


  _____  

From: Jason Birch [mailto:Jason.Birch at nanaimo.ca] 
Sent: Wednesday, March 22, 2006 9:30 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Custom layouts...


That's awesome Alain, thanks very much for putting that together.
 
Jason

  _____  

From: Alain Lebatard [mailto:alain.lebatard at autodesk.com] 
Sent: Wednesday, March 22, 2006 09:21
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Custom layouts...



Jason,

 

I attached a couple HTML pages that show you a possible approach in
displaying the legend control in another place In this example the legend
control runs in an IFrame at the right of the viewer (see screen snapshot
below

 

This approach requires no code change in the template files. The main issue
is that the legend control and the viewer call each other, the viewer to set
the scale as the map is navigated, or to refresh the control among other
things, and the legend control to change the visibility of layers and
groups. When the frame hosting the control changes, the way the control and
the viewer reference each other in the code needs to change as well. The
reference to the AJAX viewer in the legend control code was hardcoded. I
changed this and I will submit the change to the mapguide trunk shortly. The
reference to the legend control from the AJAX viewer is hold by a variable
so all needs to be done is changing the content of this variable to point to
the new control.

 

The sample script 'legendpane.html' shows you how to wait for the map to be
fully initialed, create a new legend control (not the new parameter MAPFRAME
to the LegendCtrl.php request), and when this control is fully initialized,
sets a reference to it in the AJAX viewer. From that point on the AJAX
viewer will interact with the new control.

 

The drawback of this approach is that the initial legend control is still
there, only not visible. But it's not a big deal, the control is inactive
after you attached the new instance to the AJAX viewer. The advantage of
this approach, which to my opinion far outweighs the drawback, is that it
requires no change in the existing surround.

 

Alain

 

 

 

-----Original Message-----
From: Jason Birch [mailto:Jason.Birch at nanaimo.ca] 
Sent: Tuesday, March 21, 2006 11:58 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Custom layouts...

 

I wonder if there is some way I could modify the template to:

 - move the legend iframe to the same area as the task results area and

 - add an inset map

 

I'm thinking that I could add a button to the toolbar area that when

clicked toggles between legend display and the task results area.  I

would also have to provide an override to the selection action,

displaying the results in the task area.  This would allow me to have a

single panel for legend/tasks/identify results, with a box at the bottom

for an inset map, maximizing the screen space.  I'd also like to see

about adding a "show/hide" button that collapses and expands the

task/inset frame.  Ideally, this would be a graphical indicator attached

to the frame like in Dreamweaver or Visual Studio.

 

If I can do these changes in a fairly generic way, then I don't have to

worry about making global changes to the template, as they'll be

globally useful.  Then I only have to worry about re-integrating the

changes with new MapGuide releases...

 

Using the Studio authoring environment and the default layout eases

maintenance and development time, but our users have become accustomed

to a custom surround.  Besides, we don't want to be boring :)

 

It would be nice if, since this app requires PHP, we could move to using

Smarty or PHPTemplate or something like that for generating the pages,

with a method of selecting the template to be used with each layout.

This would allow for easier customisation.

 

Jason 

 

-----Original Message-----

From: Kori Maleski [mailto:km at pat.ca] 

Sent: Tuesday, March 21, 2006 11:42

To: users at mapguide.osgeo.org

Subject: RE: [mapguide-users] Custom layouts...

 

 

I am not quite there yet...

 

I have had issues with trying to put an inset map in the Task Panel

because of the Task panel Page reloading.  An IFRAME would be the

easiest way - as it would mean not modifying the Frames.  You would have

to put in a Red Line function to draw the map reference area in the

inset map that would have to be called when the map view changed,

requiring another modification to the mainframe.templ.

 

I will probably start working on this next week.

 

---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060322/6f27698a/attachment.html


More information about the Mapguide_users mailing list