| |
private function onGeoResult(candidates:Array, token:Object = null):void
{
if (candidates.length > 0)
{
var addressCandidate:AddressCandidate = candidates[0];
var myGraphic:Graphic = new Graphic();
myGraphic.geometry = addressCandidate.location;
myGraphic.symbol = foundSymbol;
myGraphic.toolTip = addressCandidate.address.toString();
myGraphic.id = "graphic";
myLocationGraphicsLayer.add(myGraphic);
map.centerAt(addressCandidate.location);
SiteContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_MENU_CLICKED, false, false, ZoningWidget));
SiteContainer.dispatchEvent(new DrawEvent(DrawEvent.DRAW_END, myGraphic)) |