<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"></o:SmartTagType><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"></o:SmartTagType><!--[if !mso]>
<STYLE>st1\:* {
        BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 77.95pt 1.0in 77.95pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
LI.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
DIV.MsoPlainText {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=906443717-22032006><FONT face=Arial
color=#0000ff size=2>I second that, thanks very much Alain. Example code
is one of the most valuable tools for developers.</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face=Tahoma size=1>Andy </FONT></SPAN><BR></P>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Jason Birch
[mailto:Jason.Birch@nanaimo.ca] <BR><B>Sent:</B> Wednesday, March 22, 2006 9:30
AM<BR><B>To:</B> users@mapguide.osgeo.org<BR><B>Subject:</B> RE:
[mapguide-users] Custom layouts...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=701562817-22032006><FONT face=Arial
color=#0000ff size=2>That's awesome Alain, thanks very much for putting that
together.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=701562817-22032006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=701562817-22032006><FONT face=Arial
color=#0000ff size=2>Jason</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Alain Lebatard
[mailto:alain.lebatard@autodesk.com] <BR><B>Sent:</B> Wednesday, March 22, 2006
09:21<BR><B>To:</B> users@mapguide.osgeo.org<BR><B>Subject:</B> RE:
[mapguide-users] Custom layouts...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Jason,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">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<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">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 <st1:City w:st="on"><st1:place
w:st="on">AJAX</st1:place></st1:City> 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 <st1:City
w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> 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.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">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 <st1:City w:st="on"><st1:place
w:st="on">AJAX</st1:place></st1:City> viewer. From that point on the <st1:City
w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> viewer will interact
with the new control.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">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.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Alain<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">-----Original Message-----<BR>From: Jason Birch
[mailto:Jason.Birch@nanaimo.ca] <BR>Sent: Tuesday, March 21, 2006 11:58
AM<BR>To: users@mapguide.osgeo.org<BR>Subject: RE: [mapguide-users] Custom
layouts...</SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I wonder if there is some way I could modify the
template to:<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"> - move the legend iframe to the same area as the
task results area and<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"> - add an inset map<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I'm thinking that I could add a button to the toolbar
area that when<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">clicked toggles between legend display and the task
results area. I<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">would also have to provide an override to the selection
action,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">displaying the results in the task area. This
would allow me to have a<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">single panel for legend/tasks/identify results, with a
box at the bottom<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">for an inset map, maximizing the screen space. I'd
also like to see<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">about adding a "show/hide" button that collapses and
expands the<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">task/inset frame. Ideally, this would be a
graphical indicator attached<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">to the frame like in Dreamweaver or Visual
Studio.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">If I can do these changes in a fairly generic way, then
I don't have to<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">worry about making global changes to the template, as
they'll be<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">globally useful. Then I only have to worry about
re-integrating the<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">changes with new MapGuide
releases...<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Using the Studio authoring environment and the default
layout eases<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">maintenance and development time, but our users have
become accustomed<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">to a custom surround. Besides, we don't want to be
boring :)<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">It would be nice if, since this app requires PHP, we
could move to using<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Smarty or PHPTemplate or something like that for
generating the pages,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">with a method of selecting the template to be used with
each layout.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">This would allow for easier
customisation.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Jason <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">-----Original Message-----<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">From: Kori Maleski [mailto:km@pat.ca]
<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Sent: Tuesday, March 21, 2006
11:42<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">To:
users@mapguide.osgeo.org<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Subject: RE: [mapguide-users] Custom
layouts...<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I am not quite there yet...<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I have had issues with trying to put an inset map in the
Task Panel<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">because of the Task panel Page reloading. An
IFRAME would be the<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">easiest way - as it would mean not modifying the
Frames. You would have<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">to put in a Red Line function to draw the map reference
area in the<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">inset map that would have to be called when the map view
changed,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">requiring another modification to the
mainframe.templ.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I will probably start working on this next
week.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">---------------------------------------------------------------------<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">To unsubscribe, e-mail:
users-unsubscribe@mapguide.osgeo.org<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">For additional commands, e-mail:
users-help@mapguide.osgeo.org<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P></DIV></BODY></HTML>