Select to view content in your preferred language

SFV widget for parcel search?

740
1
04-20-2010 08:43 AM
LeeAllen
Frequent Contributor
Is there a widget for the parcel search box with radio buttons like that on the Calhoun County site on the community downloads page?, See attachment.
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Lee,

   There is not a code gallery entry for this as it is so specific to my data and site.

That being said adding the radio button is pretty trivial.

1. add the radio button mxml code to the widget. I added it above the mx:Text with id=txtLabelText
<mx:HBox width="100%" horizontalAlign="center" horizontalGap="10">
     <mx:RadioButtonGroup id="radiogroup1" itemClick="changeOpt(event)"/>
     <mx:RadioButton label="PPIN" groupName="radiogroup1" selected="true" id="idPPIN" styleName="WidgetText" />
     <mx:RadioButton label="Parcel" groupName="radiogroup1" id="idParcel" styleName="WidgetText" />
     <mx:RadioButton label="Owner" groupName="radiogroup1" id="idOwner" styleName="WidgetText" />
     <mx:RadioButton label="Address" groupName="radiogroup1" id="idAddress" styleName="WidgetText" />
    </mx:HBox>


2. Add the changeOpt function
private function changeOpt(event:ItemClickEvent):void{
    switch(event.label.toLowerCase()){
     case "ppin": {
      txtLabelText.text = "Search Parcels by PPIN (Parcel ID Number) i.e. 1234"
      queryExpr = "PPIN = '[value]'"
      break;
     }
     case "parcel":{
      txtLabelText.text = "Search Parcels by Parcel Number i.e. 1706140002014000"
      queryExpr = "Parcel_Number = '[value]'"
      break;
     }
     case "owner":{
      txtLabelText.text = "Search Parcels by Owner Name i.e. Smith John (Last First)"
      queryExpr = "NAME LIKE '%[value]%'"
      break;
     }
     case "address":{
      txtLabelText.text = "Search Parcels by Address i.e. 244 Cherokee TR"
      queryExpr = "STREET_ADDRESS LIKE '%[value]%'"
      break;
     }
    }
   }


3. In the queryFeaturesText function replace
queryExpr = configSearchText.expr;

with
if(queryExpr){
    }else{
     queryExpr = configSearchText.expr;
    }


That should be it.
0 Kudos