WAB Geocode Widget Composite Locator

5869
11
Jump to solution
02-04-2015 01:54 PM
StanMcShinsky
Occasional Contributor III

I have a composite locator in the Geocode widget in WAB. I would like to know if there is a way to display what locator was used in the search. Either in the auto populate search bar

search.jpg

or in the popup from the result.

popup.jpg

One of the reasons I think this would be helpful is because on one of my composite locators I am searching based of attributes from features. I have unique IDs that I want to search for but the IDs are only unique for that feature class. So I could and do have IDs that match from different feature classes. As An additional thought I might be nice to have the geocode score as well in the popup.

Here is an esri example of what I was thinking

Geocode an address | ArcGIS API for JavaScript

results.jpg

0 Kudos
11 Replies
LarryStout
Occasional Contributor III

Stan,

Sorry, I didn't make the connection.  Since I implemented my Flex autocomplete with a table upstream of the geocoder, I don't have to worry about the geocoder's scoring.  If the user selects an autocomplete candidate, I send the whole ID to the geocoder, and the match score is usually 100%.  Esri's auto complete runs off of what is returned by the geocoder, so I can just change the scoring in all 26 of my geocoders.  I think I may implement my Flex workflow into the WAB.  I like it better.

Thanks for helping me see the light.  I never made the connection.

Larry

by Anonymous User
Not applicable

This would be a good default functionality of the Search WAB widget.  I have noticed WAB Search is much slower with several geocoders to hit, vs one composite, for Suggestions.  Perhaps 10 or 20 seconds even. So I created a composite with several fields and layers like owner name, parcel ID, address in two different fields (address point layer and from parcel layer field). Only problem... can't see which locator was used, when in the Composite. I may look in to this mod here. I'm already planning to use Robert's sweet WAB override to make the parcel polygon feature class's popup show. How to customize Search Widget to show feature pop-up?   

Now, the WAB Search can search the feature service directly and display popup, with that checkbox. Works great. The only problem is, it's very very slow. Compared to Locators. Which is to be expected given they're not indexed. So I am going to use his code to intercept and show the click on the parcel the geocode result is inside of as above.  But I guess I'll either need to use the logic in this thread on a Composite locator, or figure out some other way of speeding up the auto suggest and general geocoder/locator performance.  It will be important for our users see which locator the result is coming from. But even after I doubled RAM/CPU on our AWS to 16GB/4CPU and all it does is this one property search site it still lags for suggestions. http://cloud.sagis.org/sagisnext (still in dev... here, for now as of 10/5 it's using feature layer directly for the webmap popup...) so I'll watch this thread provide any results if successful on my viewer...

:::: Update::::  

I just juiced my performance from 10 seconds down to only one second by simply ratcheting up the minimum character length before it starts posting request to Suggest to the Locator service...

add this line as below:

minCharacters: 4,

Go in to the Search widget file.     YourApp/Widgets/Search/widget.js

///// approx line 90.....///

this.searchDijit = new Search({
activeSourceIndex: searchSouces.length === 1 ? 0 : 'all',
minCharacters: 4,     /////       add this line

///////

0 Kudos