Hi Olav-
As Arothian suggested, it's probably better to use the native vector
graphics capabilities in Flash than using external images (better
performance). Here's some code that shows how to create a circle + label
Sprite to use as the icon for a Marker. You could adapt this to draw a
rectangle instead.

      var sprite:Sprite = new Sprite();
      sprite.graphics.lineStyle(2, 0x000000, 1);
      sprite.graphics.beginFill(color, 1);
      sprite.graphics.drawCircle(0,0,radius);

      if (label != "") {
        var labelMc = new TextField();
        labelMc.autoSize = TextFieldAutoSize.LEFT;
        labelMc.selectable = false;
        labelMc.border = false;
        labelMc.embedFonts = false;
        labelMc.mouseEnabled = false;
        labelMc.width = radius;
        labelMc.height = radius;
        labelMc.text = label;
        labelMc.x = -(labelMc.width * 0.5);
        labelMc.y = -(labelMc.height * 0.5);
        sprite.addChild(labelMc);
      }

- pamela

On Sat, Mar 28, 2009 at 10:01 AM, Olav <[email protected]> wrote:

>
> Hi, thanks for the reply. I need rectangles with room for location
> names. Draggable and clickable labels in other words. MapIconMaker
> works fine for this. Would be good if it also could auto-adjust the
> width to fit the length of the text, but I should be able to solve
> that I think.
> >
>

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