I'm realy sory, i tryed to do it until 3 days, but i got finaly found my mistake now, i just miss "geocoder.geocode(address.text);" line at end of script, thanx for everything.
On 29 Aralık, 16:55, Macroman <[email protected]> wrote: > how can i get address data onClick? i can't find any domo about it, i > searched group, found somethings and tryed it but can't get result: > > ---------------------------------------------------------------------------------------------- > > import mx.controls.Alert; > import com.google.maps.LatLng; > import com.google.maps.Map; > import com.google.maps.MapEvent; > import com.google.maps.MapMouseEvent; > import com.google.maps.MapZoomEvent; > import com.google.maps.MapType; > import com.google.maps.controls.ZoomControl; > import com.google.maps.controls.MapTypeControl; > import com.google.maps.InfoWindowOptions; > import com.google.maps.services.GeocodingEvent; > import com.google.maps.services.ClientGeocoder; > import com.google.maps.services.GeocodingResponse; > import com.google.maps.services.Placemark; > > private var map:Map; > private var placemarks:Array; > private var geocoder:ClientGeocoder; > > public function onHolderCreated(event:Event):void { > map = new Map(); > map.language = "en"; > map.key = "key"; > map.addEventListener(MapEvent.MAP_READY, onMapReady); > mapHolder.addChild(map); > } > > public function onHolderResized(event:Event):void { > map.setSize(new Point(mapHolder.width, mapHolder.height)); > } > > private function onMapReady(event:Event):void { > map.enableScrollWheelZoom(); > map.enableContinuousZoom(); > map.setCenter(new LatLng(37.773527, 29.086490), 9, > MapType.HYBRID_MAP_TYPE); > geocoder = new ClientGeocoder(); > geocoder.addEventListener(GeocodingEvent.GEOCODING_SUCCESS, > handleGeocodingSuccess); > map.addEventListener(MapMouseEvent.CLICK, onMapClick); > } > > private function onMapClick(event:MapMouseEvent):void { > geocoder.reverseGeocode(event.latLng); > map.openInfoWindow(event.latLng, new InfoWindowOptions( > { title: "Address Information : ", content: > placemarks.address } > )); > } > > private function handleGeocodingSuccess(e:GeocodingEvent):void > { > placemarks = e.response.placemarks; > } > > ---------------------------------------------------------------------------------------------- -- 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.
