Custom layouts...

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom layouts...

Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Andy Morsell
Page cannot be found
I think you could get could it to work.  The default viewer uses a frameset and as long as you know the names of the various frames, you should be able to target your functions correctly.  Take a look in the C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles folder at the
framesetnotaskbar.templ and framesettaskbar.templ files.  In some custom code I have done, I target the hidden scriptFrame and then interact with the mapFrame for the client-side API.

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


From: Jason Birch [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:12 AM
To: [hidden email]
Subject: [mapguide-users] Custom layouts...

I have an extremely custom MapGuide implementation that I need to look at migrating.  The application portion isn't all that complex, but the layout is:
 
Just plugging in the default viewer would lead to a severe reduction in aesthetics.  Does anyone have procedures/guidelines for hacking my own viewer template?  Do I need to make global changes or can I constrain it to this map?
 
The site currently supports ActiveX and the Java Viewer, so AJAX is my target viewer.  I think that I should just be able to create a layout without any surround elements and use that in the main window, but I have a feeling that the task area and the custom tools are going to be hard to implement.
 
Jason
Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Jason Birch
In reply to this post by Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Kori Maleski-2
In reply to this post by Jason Birch

Jason,

I am going through the process of documenting the requirements for migrating
all of our municipal clients' MG 6.5 over to the new framework.  They are
all customized in the same fashion as yours.

If you drop your WebLayout into your required frame, with everything
defaulted off (the task panel, Toolbar etc.); all that remains is migrating
over the clientside Javascript.

mainframe.templ is the file you have to modify and use.

If you have a custom OnSelectionChanged command or ToolButton command you
would call or access these functions - just go through it and see which MG
6.5 javascript functions can be ported over.

I have had few issues moving my apps over.

The only hiccup is that modifications will affect all your hosted
applications - which raises questions regarding a hosted environment where
you have more than one application operating.

Is it possible to configure a webserver to have more than one mapviewer?



Kori Maleski  BSc.
Senior Technical Consultant
 


Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL
403.770.1917
 
 
FAX
877.691.9149
 TOL
877.691.9171
www.pat.ca

________________________________________
From: Jason Birch [mailto:[hidden email]]
Sent: March 21, 2006 11:12 AM
To: [hidden email]
Subject: [mapguide-users] Custom layouts...

I have an extremely custom MapGuide implementation that I need to look at
migrating.  The application portion isn't all that complex, but the layout
is:
http://enviro.nanaimo.ca/index.cfm?tab_ID=2&content_ID=5
 
Just plugging in the default viewer would lead to a severe reduction in
aesthetics.  Does anyone have procedures/guidelines for hacking my own
viewer template?  Do I need to make global changes or can I constrain it to
this map?
 
The site currently supports ActiveX and the Java Viewer, so AJAX is my
target viewer.  I think that I should just be able to create a layout
without any surround elements and use that in the main window, but I have a
feeling that the task area and the custom tools are going to be hard to
implement.
 
Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Alain Lebatard
In reply to this post by Jason Birch
Page cannot be found

Jason,

 

You won’t have any problem with framed pages within an IFRAME. Attached is a picture of the whole AJAX sample application within an IFRAME, on Firefox.

 

IFRAME is well supported in the 3 browsers that the AJAX viewer can run on. The only difference you will find between browsers is the way to reference the IFRAME content from Javascript. You can see an example of that in ajaxmappane.templ, where the viewer calls script methods in the legend control and the property control, both running in separate IFRAMEs.

 

Alain

 

 


From: Jason Birch [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:40 AM
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...

 

I wonder if I can just embed the map within an IFRAME; I'll have to give that a shot.  I've never tried running a framed page within an IFRAME.  I'd imagine that I'm going to run into browser support issues with this...

 

Jason

 


From: Andy Morsell [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:28
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...

I think you could get could it to work.  The default viewer uses a frameset and as long as you know the names of the various frames, you should be able to target your functions correctly.  Take a look in the C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles folder at the

framesetnotaskbar.templ and framesettaskbar.templ files.  In some custom code I have done, I target the hidden scriptFrame and then interact with the mapFrame for the client-side API.

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


From: Jason Birch [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:12 AM
To: [hidden email]
Subject: [mapguide-users] Custom layouts...

I have an extremely custom MapGuide implementation that I need to look at migrating.  The application portion isn't all that complex, but the layout is:

http://enviro.nanaimo.ca/index.cfm?tab_ID=2&content_ID=5

 

Just plugging in the default viewer would lead to a severe reduction in aesthetics.  Does anyone have procedures/guidelines for hacking my own viewer template?  Do I need to make global changes or can I constrain it to this map?

 

The site currently supports ActiveX and the Java Viewer, so AJAX is my target viewer.  I think that I should just be able to create a layout without any surround elements and use that in the main window, but I have a feeling that the task area and the custom tools are going to be hard to implement.

 

Jason

Reply | Threaded
Open this post in threaded view
|

Firefox - Transferring data from localhost....

Andy Morsell
Page cannot be found
Alain,
I see that your Firefox also displays "Transferring data from localhost........." perpetually in the statusbar and the little activity circle in the upper-right hand corner is always moving when accessing a web layout with the AJAX viewer (I actually can't view a raw web layout with the DWF viewer in Firefox since I get no challenge/response dialog, but that's another issue I need to research).  Is this something that can be prevented in the future, or is it a Firefox issue?
 
Thanks.
 

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

 

 

 


Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Jason Birch
In reply to this post by Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Firefox - Transferring data from localhost....

Alain Lebatard
In reply to this post by Andy Morsell
Page cannot be found

Andy,

 

This needs to be investigated. I’ve seen the problem in other applications and my hunch is that it’s an issue with Firefox/asynchronous requests involving or not XMLHTTP. I need to inquire further to understand the exact nature of the problem and see if we can fix it in the AJAX viewer.

 

Alain

 


From: Andy Morsell [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 11:27 AM
To: [hidden email]
Subject: [mapguide-users] Firefox - Transferring data from localhost....

 

Alain,

I see that your Firefox also displays "Transferring data from localhost........." perpetually in the statusbar and the little activity circle in the upper-right hand corner is always moving when accessing a web layout with the AJAX viewer (I actually can't view a raw web layout with the DWF viewer in Firefox since I get no challenge/response dialog, but that's another issue I need to research).  Is this something that can be prevented in the future, or is it a Firefox issue?

 

Thanks.

 

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

 

 

 


Reply | Threaded
Open this post in threaded view
|

Re: Firefox - Transferring data from localhost....

Paul Spencer-2
In reply to this post by Andy Morsell
Andy,

I've seen this issue with Firefox before.  From what I remember, it  
is an issue with Firefox, not with the application.  I seem to  
remember spending quite a bit of time on this and finally finding a  
bug in mozilla's bugzilla but I can't find the reference any more :(

Cheers

Paul

On 21-Mar-06, at 2:27 PM, Andy Morsell wrote:

> Alain,
> I see that your Firefox also displays "Transferring data from  
> localhost........." perpetually in the statusbar and the little  
> activity circle in the upper-right hand corner is always moving  
> when accessing a web layout with the AJAX viewer (I actually can't  
> view a raw web layout with the DWF viewer in Firefox since I get no  
> challenge/response dialog, but that's another issue I need to  
> research).  Is this something that can be prevented in the future,  
> or is it a Firefox issue?
>
> Thanks.
>
> Andy Morsell, P.E.
> Spatial Integrators, Inc.
> http://www.SpatialGIS.com
>
>
>
>
> <593141219>
>
>
>
>

+-----------------------------------------------------------------+
|Paul Spencer                           [hidden email]   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Kori Maleski-2
In reply to this post by Jason Birch

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.





 

Kori Maleski  BSc.
Senior Technical Consultant
 


Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL
403.770.1917
 
 
FAX
877.691.9149
 TOL
877.691.9171
www.pat.ca

________________________________________
From: Jason Birch [mailto:[hidden email]]
Sent: March 21, 2006 12:30 PM
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...

Great, thanks for the confirmation.  That'll make the job a bit easier.
 
Now I have to figure out how to maximize the map space.  I've done
that in this app by making the layer control, legend, and search functions
all occupy the same space.  
 
Customizing the main templates is not really an option for me because I will
have at least two maps running on this machine.   I'd like to be able to
pull the layer control out of the layout and put it in its own iframe in my
layout.  I'm guessing that this is going to take some serious hacking;
probably taking a static copy of what the template generates, extracting the
layer control, and retrofitting it into my layout...  Does this sound
do-able?  I'm thinking that I may need to be able to hook into a map refresh
"event" to refresh my layers list.
 
I'm also thinking about the inset map.  Kori, some of your clients are
running insets; have you been able to replicate this functionality?
 
Jason

________________________________________
From: Alain Lebatard [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 11:09
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...
Jason,

You won’t have any problem with framed pages within an IFRAME. Attached is a
picture of the whole AJAX sample application within an IFRAME, on Firefox.

IFRAME is well supported in the 3 browsers that the AJAX viewer can run on.
The only difference you will find between browsers is the way to reference
the IFRAME content from Javascript. You can see an example of that in
ajaxmappane.templ, where the viewer calls script methods in the legend
control and the property control, both running in separate IFRAMEs.

Alain



________________________________________
From: Jason Birch [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:40 AM
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...

I wonder if I can just embed the map within an IFRAME; I'll have to give
that a shot.  I've never tried running a framed page within an IFRAME.  I'd
imagine that I'm going to run into browser support issues with this...
 
Jason

________________________________________
From: Andy Morsell [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:28
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...
I think you could get could it to work.  The default viewer uses a frameset
and as long as you know the names of the various frames, you should be able
to target your functions correctly.  Take a look in the C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles folder at the
framesetnotaskbar.templ and framesettaskbar.templ files.  In some custom
code I have done, I target the hidden scriptFrame and then interact with the
mapFrame for the client-side API.
Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com 
________________________________________
From: Jason Birch [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 10:12 AM
To: [hidden email]
Subject: [mapguide-users] Custom layouts...
I have an extremely custom MapGuide implementation that I need to look at
migrating.  The application portion isn't all that complex, but the layout
is:
http://enviro.nanaimo.ca/index.cfm?tab_ID=2&content_ID=5
 
Just plugging in the default viewer would lead to a severe reduction in
aesthetics.  Does anyone have procedures/guidelines for hacking my own
viewer template?  Do I need to make global changes or can I constrain it to
this map?
 
The site currently supports ActiveX and the Java Viewer, so AJAX is my
target viewer.  I think that I should just be able to create a layout
without any surround elements and use that in the main window, but I have a
feeling that the task area and the custom tools are going to be hard to
implement.
 
Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Jason Birch
In reply to this post by Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Andy Morsell
I thought that Autodesk was looking at making a locator/inset map an
additional web layout component.  It really seems like it should be a
standard element.


Andy

-----Original Message-----
From: Jason Birch [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 11:58 AM
To: [hidden email]
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:[hidden email]]
Sent: Tuesday, March 21, 2006 11:42
To: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Alain Lebatard
In reply to this post by Jason Birch

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:[hidden email]]
Sent: Tuesday, March 21, 2006 11:58 AM
To: [hidden email]
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:[hidden email]]

Sent: Tuesday, March 21, 2006 11:42

To: [hidden email]

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: [hidden email]

For additional commands, e-mail: [hidden email]

 

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Jason Birch
In reply to this post by Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

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

Andy


From: Jason Birch [mailto:[hidden email]]
Sent: Wednesday, March 22, 2006 9:30 AM
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...

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


From: Alain Lebatard [mailto:[hidden email]]
Sent: Wednesday, March 22, 2006 09:21
To: [hidden email]
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:[hidden email]]
Sent: Tuesday, March 21, 2006 11:58 AM
To: [hidden email]
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:[hidden email]]

Sent: Tuesday, March 21, 2006 11:42

To: [hidden email]

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: [hidden email]

For additional commands, e-mail: [hidden email]

 

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Kori Maleski-2
In reply to this post by Alain Lebatard
Nicely done Alain.

Kori Maleski  BSc.
Senior Technical Consultant
 


Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL
403.770.1917
 
 
FAX
877.691.9149
 TOL
877.691.9171
www.pat.ca

________________________________________
From: Alain Lebatard [mailto:[hidden email]]
Sent: March 22, 2006 10:21 AM
To: [hidden email]
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



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Custom layouts...

Ung, Seng
In reply to this post by Jason Birch
Will this new MapGuide also supporting Coldfusion MX?
-----Original Message-----
From: Jason Birch [mailto:[hidden email]]
Sent: Wednesday, March 22, 2006 9:30 AM
To: [hidden email]
Subject: RE: [mapguide-users] Custom layouts...

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


From: Alain Lebatard [mailto:[hidden email]]
Sent: Wednesday, March 22, 2006 09:21
To: [hidden email]
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:[hidden email]]
Sent: Tuesday, March 21, 2006 11:58 AM
To: [hidden email]
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:[hidden email]]

Sent: Tuesday, March 21, 2006 11:42

To: [hidden email]

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: [hidden email]

For additional commands, e-mail: [hidden email]