Hi,
use this it will work.

[Embed(source="Images/marker.png")]
   private var MyCustomMarkerIcon:Class;

var style:StrokeStyle = new StrokeStyle({ thickness: 5,color: 0xFF0000,
alpha: 0.7,pixelHinting: false });
var markerOptions:MarkerOptions = new MarkerOptions({draggable: true});
   markerOptions.icon = new MyCustomMarkerIcon();
   markerOptions.hasShadow = false;
   markerOptions.iconAlignment = MarkerOptions.ALIGN_LEFT +
MarkerOptions.ALIGN_TOP;
   markerOptions.iconOffset = new Point(-16, -30);
   markerOptions.strokeStyle = style;

marker = new Marker(getCenter(), markerOptions);
(marker.foreground as UIComponent).toolTip =
GMapConstants.TOLLTIP_REMOVE_MARKER;
marker.addEventListener(MapMouseEvent.DRAG_START, onMarkerDragStart);
   marker.addEventListener(MapMouseEvent.DRAG_END, onMarkerDragEnd);
   marker.addEventListener(MapMouseEvent.DOUBLE_CLICK, onMarkerDoubleClick);
   this.addOverlay(marker);

Regards,
Tanmaya

On Sat, Jan 17, 2009 at 11:27 PM, mat <[email protected]> wrote:

>
> Hi
>
> I am trying to use an image for a Marker icon, my code is;
>
> private function createMarker(latlng:LatLng):void {
>                var img:Image = new Image();
>                img.source = "assets/marker.png";
>
>                var options:MarkerOptions = new MarkerOptions();
>                options.icon = img;
>
>                var marker:Marker = new Marker( latlng, options );
>                map.addOverlay(marker);
> }
>
> But it doesnt seem to work. Can anyone point me to what I am doing
> wrong?
>
> regards
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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