Select to view content in your preferred language

SFV 1.3 Pass URL to Search parcels

5002
18
05-06-2010 07:59 AM
LeeAllen
Frequent Contributor
I would like to pass a URL string from our property search page like http://...PRCL_ID=1420303004021000 to the flex app search so that when users click on a link on the property search page, this ID is sent to the app and zooms to the parcel automatically. Is this possible?

I have the search widget setup to search ID's when typed in.

http://gis.snco.us/gisviewer

Lee
Tags (2)
0 Kudos
18 Replies
CoryHines
Deactivated User
Hi Lee,

I'll take a look at this when I get some time.  It hasn't been a productive week so far!

Cory
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lee,

   Try adding
queryMultiImgField = "";
to the
public function queryPID(sParam:String):void
function.
0 Kudos
LeeAllen
Frequent Contributor
I'm getting an error when exporting release build (which I believe I was getting just before I implemented your code).  Obviously it is referring to  the custom draw tool, but can't figure out why it is looking for an associated html file.

   See details for more information.
    Flash Builder could not publish the project source: Resource '/Flexviewer1.3/bin-release1/srcview/source/com/esri/draw/CustomDraw.as.html' does not exist.
      Resource '/Flexviewer1.3/bin-release1/srcview/source/com/esri/draw/CustomDraw.as.html' does not exist.
 
thanks for any help!
0 Kudos
CoryHines
Deactivated User
Hi Lee,

Unless I'm mistaken, There shouldn't be a CustomDraw.as.html file, it should only be CustomDraw.as or Action Script file, not HTML.  Try renaming that file with just the .as extension.

Cory
0 Kudos
LeeAllen
Frequent Contributor
Robert helped me get it finalized, thanks also Cory.

http://gis.snco.us/publicgis/index.html?PRCL_ID=1093104001003000
0 Kudos
FrankTrevino
Emerging Contributor
Hi,
I was able to get the solution above to work, but how do you display the attributes after the search has been performed. The application zooms-in, but there is nothing in the results window or datagrid? If I use the search widget and type in a parcel or use the graphical tools, the results show up fine, but will not display by passing the parameter via the url.



Thanks,
Frank
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Frank,

  The zoom in to the parcel is the easy part of the code. if you are not getting the search widget to actually run the query and display the results than there a a half dozen or more things that could be wrong. This is not a very easy thing to setup as there are so many vital steps that have to be done correctly to many different files for this to work. My best suggestion as the developer of the code is to care fully look at each post in the original thread and check and double check that you have completed all of the steps. There are instruction scattered all over the place in the original thread.
0 Kudos
FrankTrevino
Emerging Contributor
Thanks Robert. I was able to find a smal piece of code in the previous threads that I was missing as part of my query function in the SearchWidet. I added a 'for loop' and I am now getting back the query fields as part of my results.

Is there a way to add the result to the floating Datagrid? I am tweaking the code a bit to add the logic, but I keep getting the mesg "No Datagrid configured......."

Looks like myfloatdg is not getting initialized

   if (myfloatdg){
        if(myfloatdg.datagrid.dataProvider)
         myfloatdg.datagrid.dataProvider.removeAll();
        myfloatdg.csvName = _csvName;
        myfloatdg.dgColumns = gridFields;
        myfloatdg.dgHyperColumns = gridHyperFields;
        myfloatdg.showHyperAlias = gridHyperFieldsAlias;
        myfloatdg.dProvider = featureSet.attributes;
        myfloatdg.graphicslayer = graphicsLayer;
        myfloatdg.zoomScale = zoomScale;
        myfloatdg.ownerWidget = sWidget;
       }



Frank
0 Kudos
FrankTrevino
Emerging Contributor
Hi,
I was wondering if there is a way to furthur customize the passing of the URL to also search for an address using a geocode service, much the same way the parcels is being passed and uses the search widget. If an application appends an address to the url, is it possible to call the "Locate Widget" and perform the address search. I've tried to incorporate some of the logic used in these threads, but not much luck.

I got it to work using the searcgwidget and just point to the address layer instead of parcels, but I would like use the geocode service and display the address matches. Is this something that can be configured.

Frank
0 Kudos