Select to view content in your preferred language

Help with configuring SearchWidget_Louisville

820
4
09-01-2010 10:15 AM
JoshuaCoates
Deactivated User
I am trying to configure the SearchWidget_Louisville in order to search for an address from "Adress" layer in my map service. I figured this would be easier than creating an address locator and recreating my map service and so forth. When I open the SearchWidget_Louisville.xml...I am not sure what all I need to fill in. Does the first line...."<info>widgets/InfoTemplates/InfoPopupWidget.swf</info>" really need to be there? What is its purpose? Also, if I look at the config.xml at the widget label, what all do I need to fill in here? I dont know what I need to put for config and for the URL here. Same with what to put for the fields in the widget.xml?? Can anyone offer advice?

Thanks,
Josh
Tags (2)
0 Kudos
4 Replies
JoshuaCoates
Deactivated User
Ok well I have halfway figured this out, I have two layers in the Search widget and I have one working properly. I have one layer that is searching for Panel ID #'s and one searching for adresses. They are set up the same and I have used the correct Field Labels and expressions....or so I thought, however, the search address will work when u define by graphic search by using the rectangle. It will pull up addresses from my map service. However, when I try to search by text for an address, and type it exactly as it appears in the attribute field in my map service, it finds no results. Any idea what I am doing wrong? I have attached my SearchWidget_Louisville.xml below.

<?xml version="1.0" ?>
<configuration>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
    <layers>
        <layer>
            <name>Search by Address</name>
            <url>http://publicgis/PublicGISserver/rest/services/Basemap/MapServer/1</url>
            <expression>ADDRESS ='[value]'</expression>
            <textsearchlabel>Search by Address  [ Example: 115 W Cherokee Ave. ]:</textsearchlabel>
            <graphicalsearchlabel></graphicalsearchlabel>
            <fields>ADDRESS,STREET NO,STREET,CITY,STATE,ZIP,OWNERLAST,OWNERFIRST</fields>
            <titlefield>ADDRESS</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Searb by FIRM ID#</name>
            <url>http://publicgis/PublicGISserver/rest/services/2007_DFIRM/MapServer/1</url>
            <expression>PANEL ='[value]'</expression>
            <textsearchlabel>Search FIRM Panel by Panel #... [ Example: 0240 ]</textsearchlabel>
            <graphicalsearchlabel></graphicalsearchlabel>
            <fields>PANEL,FIRM_ID,FIRM_PAN</fields>
            <titlefield>PANEL</titlefield>
            <linkfield></linkfield>
        </layer>
    </layers>
    <zoomscale>5000</zoomscale>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joshua,

   Try
<expression>ADDRESS LIKE '%[value]%'</expression>
instead
0 Kudos
JoshuaCoates
Deactivated User
Thank you! It worked:) Also, for the search by address layer I have, under <fields> how can i have the fields I want to display shown in the order in which I have them typed? In other words.....this is the xml I have typed "<fields>ADDRESS,STREET NO,STREET,CITY,STATE,ZIP,OWNERLAST,OWNERFIRST</fields>" They show up in a random order when I perform the search on my Flex map.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joshua,

   That's just the way it is without some good modification to the widget to handle this.
0 Kudos