[Chameleon] Locate by Attribute Widget

Jessica Fendos Jessica.Fendos at state.mn.us
Wed Mar 21 16:46:57 EST 2007


Hi list:
 
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:
 
<cwc2 type="LocateByAttribute" searchall="true"
pointzoombuffer="500" height="90" width="400" highlight="true"
allowdownload="true" popup="false" VISIBLE="TRUE"/>
 
<cwc2 type="LocateByAttribute" searchall="true"
pointzoombuffer="500" height="90" width="400" highlight="true"
allowdownload="true" popup="true" linktext="Locate By Atts"
VISIBLE="TRUE"/>
 
Mapfile (just one layer for this example)
 
LAYER # LRT
  NAME "Hiawatha LRT"
  METADATA
    "Transportation" "true"
    "RESULT_FIELDS" "line_id from_stat to_stat"
    "SPATIALSEARCH" "FROM_STAT"
    "SPATIALSEARCHLIST" "DETAILS"
  END
  GROUP "Hiawatha LRT"
  STATUS OFF
  MAXSCALE 200000
  DATA LRT
  TYPE LINE
  CLASS NAME "Hiawatha LRT" TEMPLATE "ttt_query.html" STYLE SIZE 3
COLOR 255 153 51 SYMBOL "circle" END END
  TOLERANCE 5
 
My questions are as follows:
 
1. Since my application requires multiple query (size, type,
location), how can the widget be customized to fit this need? 
 
2. Also, I could not make a nice looking icon to display using the
tag below. Could someone please pinpoint what I did wrong? 
 
<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">
        <image state="normal"/>
        <image state="selected"/>
        <image state="hover"/>
</cwc2>
 
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. 
 
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? 
 
I know I asked a lot from you but if someone can please shed some
light on these issues it will save me a lot of grey hair. Thanks a
lot. 
 
Regards,
Jessica Fendos 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20070321/0da7d714/attachment.html


More information about the Chameleon mailing list