<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV dir=ltr align=left>
<DIV dir=ltr align=left><SPAN class=080482222-21032007><FONT color=#0000ff>Hi
Jessica,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=080482222-21032007><FONT
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=080482222-21032007><FONT
color=#0000ff>Answers inline</FONT></SPAN></DIV></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<B>From:</B> chameleon-bounces@lists.maptools.org
[mailto:chameleon-bounces@lists.maptools.org] <B>On Behalf Of </B>Jessica
Fendos<BR><B>Sent:</B> 22 March 2007 06:47<BR><B>To:</B>
chameleon@lists.maptools.org<BR><B>Subject:</B> [Chameleon] Locate by
Attribute Widget<BR><BR></DIV>
<DIV></DIV>
<DIV>Hi list:</DIV>
<DIV> </DIV>
<DIV>I am a newbie to Chameleon and am trying to build an interactive mapping
website for a State of MN project. In my application, I would like to
have a query function that will enable the users to search for developable
sites that meet a certain criteria (e.g. size between 2-4 acres, building type
is industrial, and location in X city, Y county.) I tried using the
LocateByAttribute widget. According to the how_to_use.txt, you can set it up
for an iframe or a pop up. I tried embedding both in my html file:</DIV>
<DIV> </DIV>
<DIV><cwc2 type="LocateByAttribute" searchall="true" pointzoombuffer="500"
height="90" width="400" highlight="true" allowdownload="true" popup="false"
VISIBLE="TRUE"/></DIV>
<DIV> </DIV>
<DIV><cwc2 type="LocateByAttribute" searchall="true" pointzoombuffer="500"
height="90" width="400" highlight="true" allowdownload="true" popup="true"
linktext="Locate By Atts" VISIBLE="TRUE"/></DIV>
<DIV> </DIV>
<DIV>Mapfile (just one layer for this example)</DIV>
<DIV> </DIV>
<DIV>LAYER # LRT<BR> NAME "Hiawatha LRT"<BR>
METADATA<BR> "Transportation" "true"<BR>
"RESULT_FIELDS" "line_id from_stat to_stat"<BR>
"SPATIALSEARCH" "FROM_STAT"<BR> "SPATIALSEARCHLIST"
"DETAILS"<BR> END<BR> GROUP "Hiawatha LRT"<BR> STATUS
OFF<BR> MAXSCALE 200000<BR> DATA LRT<BR> TYPE LINE<BR>
CLASS NAME "Hiawatha LRT" TEMPLATE "ttt_query.html" STYLE SIZE 3 COLOR 255 153
51 SYMBOL "circle" END END<BR> TOLERANCE 5</DIV>
<DIV> </DIV>
<DIV>My questions are as follows:</DIV>
<DIV> </DIV>
<DIV>1. Since my application requires multiple query (size, type, location),
how can the widget be customized to fit this need? </DIV>
<DIV> </DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT color=#0000ff>Well..... it
would have to be rebuilt from the ground up, pretty much. It would require a
mechanism that keeps adding criteria-boxes dynamically, and that manages the
dynamic number of form fields, also on the server-side. It could probably be
done, but would be quite complex.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV> </DIV>
<DIV>2. Also, I could not make a nice looking icon to display using the
tag below. Could someone please pinpoint what I did wrong? </DIV>
<DIV> </DIV>
<DIV><cwc2 type="LocateByAttribute" styleresource="TextButtons"
imagewidth="150" Image="icons/icon_locate.png" ImageTip="Locate"
Label="Locate" searchall="false" popup="true" height="500" width="500"
highlight="true" allowdownload="true"
visible="true"><BR> <image
state="normal"/><BR> <image
state="selected"/><BR> <image
state="hover"/><BR></cwc2></DIV>
<DIV> </DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT face=Arial color=#0000ff>The
LocateByAttribute widget is not integrated with the buttuonizer or the
styleresource widget yet. So basically that syntax won't work. To use an image
as a link, you could try something like </FONT></SPAN></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff></FONT><SPAN
class=629062422-21032007> </DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff><cwc2 type="LocateByAttribute"
searchall="true" pointzoombuffer="500" height="90" width="400" highlight="true"
allowdownload="true" popup="<SPAN
class=629062422-21032007> true </SPAN>"<SPAN
class=629062422-21032007> linktext="<img
src='/image.gif'&#62" </SPAN> VISIBLE="TRUE"/><SPAN
class=629062422-21032007><FONT face=Tahoma
color=#000000> </FONT></SPAN></FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff><SPAN
class=629062422-21032007></SPAN></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial><SPAN class=629062422-21032007><FONT
color=#0000ff><FONT face=Tahoma>Not pretty, but will sort of do the job. Watch
the funny syntax at "linktext".</FONT> <FONT face=Tahoma>Obviously I have
to fix this up properly some time.</FONT></FONT></SPAN></FONT></DIV></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>3. The result of my search interface (from popup), has a list of objects
that meet my search query. They look like they are hyperlinks but they are
not. I tried adding LINK field in my shapefile and added LINK in the
RESULT_FIELD in metadata description but got an error message: undefined
index: LINK in
D:\Sites\....\chameleon-2.2.1\htdocs\widgets\LocateByAttribute\searchresults.phtml
on line 724. How can I have my search results link to other URLs? I also
altered the searchstring size in the searchresult.phtml from 10 to 40 but it
seemed to have no effect. <SPAN
class=629062422-21032007> </SPAN></DIV>
<DIV><SPAN class=629062422-21032007></SPAN> </DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT color=#0000ff>They
are hyperlinks, you're not dreaming :) If you click on them, it will zoom
to the object. If it doesn't zoom, something is wrong. Maybe you did not specify
the CWCJSAPI widget properly (it can work without the widget, but will return
results in a popup so they are not lost when the page is submitted for a zoom).
If it doesn't zoom, there *should* be javascript errors. Please use the "Error
Console" in Firefox to check.</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT color=#0000ff>I'm not sure
what "RESULT_FIELD" is, but it won't be related to the widget. If you want to
link to other URLs, put a URL in one of the attribute fields (use HTML syntax,
e.g. <a href='blah' .....>), and it should show up in the result,
providing the attribute name you put it in is included in
the "spatialsearchlist" metadata element.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV> </DIV>
<DIV>4. Using the same map file. Iframe and popup rendered
different search options. Iframe was defaulted to object ID and map, while
popup will display options as you specified in your mapfile metadata
(spatialsearch). Why is that? </DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT color=#0000ff>They *should*
behave the same. Make sure you have "searchall='false'" in the
definition.</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT color=#0000ff>Please let me
know whether any issues persist.</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT color=#0000ff>best
regards,</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT
color=#0000ff>Jacob</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=629062422-21032007><FONT
color=#0000ff></FONT></SPAN> </DIV></BODY></HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000>This email and any attachments are intended solely for the named recipient and are confidential. The copying or distribution of them or any information they contain by anyone other than the named recipient is prohibited. If you have received this document in error, please notify the sender and delete all copies from your computer system and destroy all hard copies. It is the recipient's responsibility to check this email and any attachments to this email for viruses before use.<br>
</font></td></tr></table>