I think you should add something like : markerPin.name = 's95'. it will solve your problem, but you can not get the name using your event listener, use flex library for flex and add the code that caught the name you wish inside marker_mc.
On Apr 8, 8:47 am, javadev <[email protected]> wrote: > Dear Experts > > I have problem extracting a marker name, (for my example below, i > named a maker as s95) from an event listener when user click the > marker as below code. > > I have try to extract the name by event.label (sorry, I don't know > what the correct parameter for the event) but nothing happened > > Please help > > Regards > > Taufik > > ========= > var xvalue:String; > var latlng:LatLng; > var tip:Object; > > var markerPin:marker_mc = new marker_mc(); > markerPin.width = 9; > markerPin.height = 9; > > latlng = new LatLng(-1.24325,116.770056); > tip = "s95-Waterpipe Bridge"; > var s95:Marker = new Marker( latlng, new MarkerOptions({hasShadow: > true, icon: this.addChild(markerPin), tooltip: ""+tip })); > s95.addEventListener(MapMouseEvent.CLICK,markerClicked); > map.addOverlay(s95); > > function markerClicked(event:MapMouseEvent):void{ > > xvalue = event.label ; //What the code should put here ? > > } -- 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.
