<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Creating a new widget</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>Rob,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>I'm not completely sure, but I think after this
line:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2><FONT face="Times New Roman" color=#000000>$szFunction =
<<<EOT</FONT><BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>Maybe you should have:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2><FONT face="Times New Roman" color=#000000>function
showReport()</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT
size=2>{</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT
size=2>{$szShowReport};<BR>
return true;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT
size=2>}</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>You can always check the source of the resulting page, to
see what the function body ended up looking like.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>I believe there is a widget that puts values in a drop-down
box (quickzoom), which may do what you want. Alternatively, for searching you
can use the LocateByAttribute widget. I have recently adjusted it to work with
(hopefully) all vector formats (tested with TAB, DGN, DXF, PostGIS, ESRI
Personal Geodatabase). PostGIS required a little workaround, but on my end it
does now work. It's in CVS, or e-mail me if you can't access
CVS.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2>Jacob</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=045565701-21092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> chameleon-bounces@lists.maptools.org
[mailto:chameleon-bounces@lists.maptools.org] <B>On Behalf Of </B>Rob
Male<BR><B>Sent:</B> 21 September 2006 08:20<BR><B>To:</B>
chameleon@lists.maptools.org<BR><B>Subject:</B> [Chameleon] Creating a new
widget<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>Hello List,<BR><BR>I'm trying you create a widget using the
tutorial from here<BR><A
href="http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a+new">http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a+new</A><BR>+Chameleon+Widget#attachments<BR><BR>Everthing
works up to when I modify <BR>"function GetJavascriptFunctions()"
by adding the
following.<BR><BR>#########################################<BR>
function GetJavascriptFunctions()<BR>
{<BR> // init
vars<BR> $aReturn =
parent::GetJavascriptFunctions();<BR><BR>
///////// ADD CODE HERE IF NECESSARY
/////////<BR> // show the
report<BR> $szShowReport = strlen(
$this->mszReport )
><BR>0?"alert('".$this->mszReport."')":"";<BR>
$szJsFunctionName =
"showReport";<BR> $szFunction =
<<<EOT<BR>
{<BR>
{$szShowReport};<BR> return
true;<BR>
}<BR>EOT;<BR><BR>$aReturn[$szJsFunctionName] =
$szFunction;<BR><BR> //
return<BR> return
$aReturn;<BR><BR> // end GetJavascriptFunctions()
function<BR>
}<BR>#########################################<BR><BR>If the application is
loaded with this function enabled everthing is<BR>displayed except the map and
the key map. Also the mouse click will not<BR>submit.<BR><BR>Is anyone able to
help ?<BR><BR>Really all I want is a widget that will allow me to display a
list of<BR>feature names from a postgis database, for example street names,
and<BR>zoom to the feature selected from the list.<BR><BR>I have an
application that does pretty well all that I need, except this<BR>searching
ablility, and unfortunately without searching it is as good
as<BR>useless.<BR><BR>Is anyone able to point me to some detailed
documentation on Chameleon<BR>eg "Chameleon for Dummies",(I know it is wishful
thinking, but no harm<BR>in asking). I've been struggling for months as most
of the documentation<BR>I've found assumes you already have a pretty good
grasp of PHP,<BR>Javascript, Mapserver and even Chameleon. Unfortunately in my
case this<BR>is not so.<BR><BR>I was very impressed when I first discovered
Chameleon after trying to<BR>generate an application from scratch using
Mapscript (especially the<BR>zoom box) but getting to this point and not being
able to proceed any<BR>further is making me think I should "cut my losses" and
return to<BR>mapscript, where at least I could do the searching that I
require.<BR><BR>Well I've had my whinge, if anyone has any suggestions (now be
nice)<BR>please let me know.<BR><BR>Cheers<BR>Rob
Male<BR></FONT></P></BLOCKQUOTE></BODY></HTML>