Hide/ delete layer name for search enabled on Header Controller

424
4
Jump to solution
05-03-2013 06:57 AM
MayJeff
Occasional Contributor
Can you hide/ delete layer name on header controller search? Thank you.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
SarthakDatt
Occasional Contributor III
I don't think so that is possible right now unless you create a custom renderer (custom skin) for the Geocoder component. The behavior comes in from the API component.

The results are shown as : {value} - {layerName} - {mapServiceName} where layername is the layer which contains the result

If you look at: http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/components/supportClasses/GeocoderM..., the name property is a utility property to show a different label other than the map service layer name, it does not affect the layerName.

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
May Jeff,

   I have not tested this but it looks like you can find the src/com/esri/viewer/components/GeocoderComponent.mxml and find the configureMapServices function and change this line:

mapService.name = mapServiceXML.name.toString();
to
mapService.name = "";
Let me know if this works.
0 Kudos
MayJeff
Occasional Contributor
I changed the code but the layer name still show up.  Thank you.
0 Kudos
SarthakDatt
Occasional Contributor III
I don't think so that is possible right now unless you create a custom renderer (custom skin) for the Geocoder component. The behavior comes in from the API component.

The results are shown as : {value} - {layerName} - {mapServiceName} where layername is the layer which contains the result

If you look at: http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/components/supportClasses/GeocoderM..., the name property is a utility property to show a different label other than the map service layer name, it does not affect the layerName.
0 Kudos
MayJeff
Occasional Contributor
Thank you all the answer.
0 Kudos