MapTools.org

[Chameleon] Context file and Tree Legend

Dave Astolfo dastolfo1@cogeco.ca
Tue, 27 Jan 2004 10:40:06 -0500
This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C3E4C1.F1D931B0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi All,

I am somewhat new to Chameleon / MapServer. I have been challenged with
having to create a new Legend Widget.  Here is what I am trying to do:


I am  trying to create a legend that uses a tree-like structure (multi
level).  

LEGEND

Layer List
+  Category 1
-------Category 1.1
-------Category 1.2
+  Category 2
-------Category 2.1
-------Category 2.2
. etc..


The challenge is that the information needed to create the legend would
be more than the Context file contains.  For example,  in order to know
where to place a Layer name in the tree,
 the context file would require additional info such as PARENT_ID.  I
was able to get this working in the GMAP demo by some JavaScript I
found. The challenge here is that GMAP was written 
In PHP and JavaScript while we need to get it working in an environment
where the Chameleon service is doing most of the legwork.   

So my questions are:

1)  Is there a way to feed Chameleon the same info that is in the
Context file from say a XML recordset stream from a database?  If so,
can someone point me to the code/files where Chameleon opens and reads
the context.xml file it is passed?

2) Does anybody have examples of Legend Widgets that they wrote that may
be similar to what I am trying to do?

3) Can someone direct me on which way I should go if I have to create my
own widget? Is there any code I could start with?


Any help or suggestions is appreciated.

Thanks a bunch!

Dave A.

------=_NextPart_000_0006_01C3E4C1.F1D931B0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.4630.0">
<TITLE>Context file and Tree Legend</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi All,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am somewhat new to Chameleon / =
MapServer. I have been challenged with having to create a new Legend =
Widget.&nbsp; Here is what I am trying to do:</FONT></P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am&nbsp; trying to create a legend =
that uses a tree-like structure (multi level).&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">LEGEND</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Layer List</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">+&nbsp; Category 1</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">-------Category 1.1</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">-------Category 1.2</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">+&nbsp; Category 2</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">-------Category 2.1</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">-------Category 2.2</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&#8230; etc&#8230;.</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">The challenge is that the information =
needed to create the legend would be more than the Context file =
contains.&nbsp; For example,&nbsp; in order to know where to place a =
Layer name in the tree,</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;the context file would require =
additional info such as PARENT_ID.&nbsp; I was able to get this working =
in the GMAP demo by some JavaScript I found. The challenge here is that =
GMAP was written </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">In PHP and JavaScript while we need to =
get it working in an environment where the Chameleon service is doing =
most of the legwork.&nbsp;&nbsp; </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">So my questions are:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">1)&nbsp; Is there a way to feed =
Chameleon the same info that is in the Context file from say a XML =
recordset stream from a database?&nbsp; If so, can someone point me to =
the code/files where Chameleon opens and reads the context.xml file it =
is passed?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">2) Does anybody have examples of Legend =
Widgets that they wrote that may be similar to what I am trying to =
do?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">3) Can someone direct me on which way I =
should go if I have to create my own widget? Is there any code I could =
start with?</FONT></P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any help or suggestions is =
appreciated.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks a bunch!</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Dave A.</FONT>
</P>

</BODY>
</HTML>
------=_NextPart_000_0006_01C3E4C1.F1D931B0--




This archive was generated by Pipermail.