From a58c05eff7c05dc4af92ff40e566a6a8d45c0a54 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 26 Feb 2013 16:15:43 -0800 Subject: [PATCH 1/2] Update event handlers used to process search result selection. --- src/com/esri/viewer/components/SingleLineSearch.mxml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/esri/viewer/components/SingleLineSearch.mxml b/src/com/esri/viewer/components/SingleLineSearch.mxml index 7398438..060ca6a 100644 --- a/src/com/esri/viewer/components/SingleLineSearch.mxml +++ b/src/com/esri/viewer/components/SingleLineSearch.mxml @@ -501,9 +501,9 @@ map.infoWindow.show(point); } - protected function geocoder_searchCompleteHandler(event:GeocoderEvent):void + protected function geocoder_resultSelectedHandler(event:GeocoderEvent):void { - projectToMapSpatialReferenceAndShowResultOnMap(event.searchResult); + projectToMapSpatialReferenceAndShowResultOnMap(event.result); } private function projectToMapSpatialReferenceAndShowResultOnMap(searchResult:GeocoderSearchResult):void @@ -733,7 +733,8 @@ left="0" right="0" top="0" bottom="0" fault="geocoder_faultHandler(event)" map="{map}" - searchComplete="geocoder_searchCompleteHandler(event)" + resultAutoSelected="geocoder_resultSelectedHandler(event)" + resultSelected="geocoder_resultSelectedHandler(event)" skinClass="com.esri.ags.skins.GeocoderSkin" useDefaultLocator="false"/> From 1704a208f6ddcff135bb1e6c423f03d346f29004 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 26 Feb 2013 16:17:06 -0800 Subject: [PATCH 2/2] Clean up SingleLineSearch. --- .../viewer/components/SingleLineSearch.mxml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/com/esri/viewer/components/SingleLineSearch.mxml b/src/com/esri/viewer/components/SingleLineSearch.mxml index 060ca6a..2eddbfe 100644 --- a/src/com/esri/viewer/components/SingleLineSearch.mxml +++ b/src/com/esri/viewer/components/SingleLineSearch.mxml @@ -19,12 +19,11 @@ + xmlns:esri="http://www.esri.com/2008/ags"> - +