Select to view content in your preferred language

configuring searchbox in HeaderControllerWidget 3.1

1470
14
Jump to solution
12-21-2012 12:12 AM
MattiasEkström
Frequent Contributor
I really like the idea of the new searchbox in the HeaderControllerWidget, but I'm not able to configuring it as I want. Don't know if I'm doing it wrong or if it's impossible without changing the source code.
I want to use my own searchlayers and no locator at all, and I want the results to display as graphics.
First of all I think the conceptual graphic in the documentation is wrong, it looks like the <labels> tag and <symbols> tag is supposed to be in the <searchlayer> tag, but in the text it says they should be in the <search> tag which seems to be correct.
My config-file looks like this (the search tag):
<search>         <searchlayers>             <searchlayer>                 <url>http://oskar75:6080/arcgis/rest/services/test/Sokning/MapServer</url>                 <layerids>0,1,2</layerids>                 <searchfields>FASTIGHET,ADRESS,TEXT</searchfields>             </searchlayer>                   </searchlayers>  <zoomscale>5000</zoomscale>  <labels>   <searchprompt>Skriv fastighet, adress eller plats</searchprompt>   <noresults>Inga träffar hittades</noresults>   <searchresulttitle>Sökträff</searchresulttitle>   <clearfeaturelabel>Rensa</clearfeaturelabel>  </labels>  <symbols>   <simplemarkersymbol color="0x00FFFF" alpha="0.7" size="10"/>   <simplefillsymbol color="0x00FFFF" alpha="0.5">    <outline alpha="0.9" width="2"/>   </simplefillsymbol>  </symbols> </search>

The search works fine for my three layer ids but also displays searchresult from what I guess is the default locator. Is there anyway to disable that?
I don't see any graphics to my results though, is something wrong with my <symbols> tag? (My layers are one polygon layer and two point layers).

My last wish I think would require editing the source code (maybe something for the next version?), I would like the resultlist to display and update while typing, without pressing enter, after the users has entered a number of characters (for example 4 or 5).
Tags (2)
0 Kudos
14 Replies
MattiasEkström
Frequent Contributor
So it seems it is a little bug then, I hope someone from the Esri Flex team could take a look at this too, among those other bugs related to the searchbox that is mentioned in other threads...

Michael: I can't provide a link since my app is in our internal network and not accessible for the public.
0 Kudos
MattiasEkström
Frequent Contributor
Since the result graphic bug/issue wasn't the main question when starting this thread, I started a new thread about it and marking this one as answered.
0 Kudos
EamonnDoyle
Esri Contributor
Hi

Is anybody aware whether there is a way to configure the behavior of the default locator in the SearchBox? I would like to use the World Geocode Service at http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer this supports say restrictionof search to a speciifc country as per the settings here http://resources.arcgis.com/en/help/arcgis-online-geocoding-rest-api/#/Single_input_field_geocoding/.... These settings can be set via the Locate Widget tags and apply to the Locate widget but I'm unclear whether it is possible to also set them for the search box.

Any help appreciated.

Eamonn
0 Kudos
RhettZufelt
MVP Notable Contributor
Eamonn,

The geolocator is set in the HeaderControlerWidget.xml file with the <locator> tag.

this is where you would put the one you want to use/try.

R_
0 Kudos
BjornSvensson
Esri Regular Contributor
Just wanted to follow up and let everyone know that the 3.2 release fixes all (we hope) of these issues:

  • work with all projections

  • turning off locator in appbuilder

  • configure mapservices in appbuilder

  • specifying sourcecountry (only with widget tag, not in appbuilder)


FYI: if you want to see what other viewer code changes made it into 3.2, look at the 58 closed and verified issues for 3.2:
https://github.com/Esri/arcgis-viewer-flex/issues?labels=verified&milestone=1&state=closed
0 Kudos