Please make reference. (Comment : //This1, //This2)

public function FlashActiondoGeocode(address : String):void
{
 if (address != '') {
                    var geocoder:ClientGeocoder = new ClientGeocoder();
                    geocoder.addEventListener(
                  GeocodingEvent.GEOCODING_SUCCESS,
                  function(event:GeocodingEvent):void {
                              var placemarks:Array =event.response.placemarks;
                              if (placemarks.length > 0) {
                                  ExternalInterface.call('SetAddress',
placemarks[0].address);
                                  map.setCenter(placemarks[0].point, 
map.getZoom()+1); //
This1
                                  var marker:Marker = new 
Marker(placemarks[0].point);
                                  marker.addEventListener(MapMouseEvent.CLICK,
                                  function (event:MapMouseEvent):void {
                                               marker.openInfoWindow(new
InfoWindowOptions({content: placemarks[0].address}));
                 });
                 map.addOverlay(marker);
                  }
                    });
                    geocoder.addEventListener(
                  GeocodingEvent.GEOCODING_FAILURE,
                  function(event:GeocodingEvent):void {
                          //Alert.show("Geocoding failed"); //This2
                                  trace(event);
                                  trace(event.status);
                    });
                    geocoder.geocode(address);
 };
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en.

Reply via email to