Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Toggle Widget On / Off

$
0
0
Just getting back to Flex API after two years in the JS API. Please forgive if this seems terribly rudimentary....I would like toggle the LayerList widget on when the user selects a search result. For example, within the SearchWidget.mxml: (my stuff in Bold Italic)

private function clickSearchResult(event:Event):void
{
if (resultFeatureLayer.visible)
{
var searchResult:ResultItem = ItemRenderer(event.target).data as ResultItem;
if (searchResult.geometry)
{
if (searchResult.geometry.type == Geometry.MAPPOINT)
{
if (map.scale > zoomScale)
{
map.scale = zoomScale;
}
}

map.zoomTo(searchResult.geometry);
TOGGLE On LayerList Widget Here!!!!!
}
clearTimeout(hitimer);
hitimer = setTimeout(showHighlight, 300, [ searchResult ]);
}
}

Viewing all articles
Browse latest Browse all 2097

Trending Articles