This is the function (fingers crossed that the code looks right) I
wrote for the map at http://www.beardsworth.co.uk/news/index.php?id=P1429.
The mcPint movie clip was originally a PNG imported into the Flash
library.
John
function createMarker(latlng:LatLng, name:String, address:String,
type:String): Marker {
var mcPint =new pint; //pint is the name of the movie clip - you'll
see why when you see the map
var marker:Marker = new Marker(latlng);
var options:MarkerOptions = new MarkerOptions({ icon:mcPint,
iconAlignment:0x20
});
marker.setOptions(options);
var html:String = address;
marker.addEventListener(MapMouseEvent.CLICK, function
(e:MapMouseEvent):void {
var infowindowoptions = new InfoWindowOptions
({contentHTML:html}) ;
infowindowoptions.fillStyle = new FillStyle({color: 0xc8c0b9,
alpha:
0.8}) ;
infowindowoptions.title = name ;
infowindowoptions.cornerRadius = 5;
marker.openInfoWindow(infowindowoptions, true);
});
return marker;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---