As always, break the problem up into steps.

*       can you load the map? Any map?  If not, fix this first.
*       can you make setCenterByAddressAndZoom() work with hard-coded
values? No, fix.

 

You say:

"...mapping the change event to mapLoad() function ..."

Do you mean:

<mx:ComboBox... change="mapLoad()" ...

 

Is the mapLoad() function getting called?  

Suggestion:

<mx:ComboBox... change="mapLoad(event)" ...

...

private function mapLoad(oEvent:Event):void

  var sAddress:String = oEvent.target.selectedItem.data;

  trace(sAddress)

...

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of g07m5064
Sent: Wednesday, October 17, 2007 4:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Yahoo Maps

 

Hi,
Let me start by stating that I am a newbie. I have just started read
through the tutorial on using Yahoo Astra Map api at:
http://www.clockobj.co.uk/2007/10/4/using-yahoo-astra-map-api-with-flex-
2
<http://www.clockobj.co.uk/2007/10/4/using-yahoo-astra-map-api-with-flex
-2> 

All went good. Hence, I have a map component which I would like to add
to an application where based on user selection (from a comboBox) a
different city is loaded on a map. I am not really sure what needs to
be triggered by the change event. I tried mapping the change event to
mapLoad() function:

private function mapLoad():void{ 
cityMap.mapController.setCenterByAddressAndZoom("{city.selectedItem.data
}",14);
}

This does not yield results. So I suspect I need to dispatch some
event that would trigger a load. Can someone point me in the right
direction.

 

Reply via email to