Bill,Here is how to do that for the SearchWidget in Flex Viewer 2.2 : private function clickSearchResult(event:Event):void { var searchResult:SearchResult = ItemRenderer(event.target).data as SearchResult; if(searchResult.geometry is Polygon){ var pPoly:Polygon = searchResult.geometry as Polygon; map.extent = pPoly.extent.expand(1.2); }else{ if (map.scale > zoomScale) { map.scale = zoomScale; } map.centerAt(searchResult.point as MapPoint); } }Is that what you are asking?
private function clickSearchResult(event:Event):void { var searchResult:SearchResult = ItemRenderer(event.target).data as SearchResult; if(searchResult.geometry is Polygon){ var pPoly:Polygon = searchResult.geometry as Polygon; map.extent = pPoly.extent.expand(1.2); }else{ if (map.scale > zoomScale) { map.scale = zoomScale; } map.centerAt(searchResult.point as MapPoint); } }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.