Hi cyrt-
Where do you want to move that label to? It's most likely not
possible. You can create your own custom marker with a label, and
position that however you'd like. The following code creates a
circular marker and puts a label on top:
var sprite:Sprite = new Sprite();
sprite.graphics.lineStyle(2, 0x000000, 1);
sprite.graphics.beginFill(color, 1);
sprite.graphics.drawCircle(0,0,radius);
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 Wed, Feb 25, 2009 at 3:25 AM, cyrt <[email protected]> wrote:
>
> I don't mean the tooltip but the label which is a property of
> MarkerOptions. The label is displayed in googlemaps, but it is
> positioned on the pin. Now I'd like to move the position of this
> label, but I'd not know which property I have to set (if there is
> any?).
>
> That's the way I am creating the marker now:
>
> new Marker(new LatLng(0,0), new MarkerOptions({draggable: true,
> label: "Name", labelFormat: {size: 11} }));
>
> On Feb 20, 8:35 am, i-gor <[email protected]> wrote:
>> It depends what you mean with a label. If you mean the yellow
>> tooltip, that's placed dynamically onRollOver and cannot be
>> manipulated, but if you want a some sort of rectangle box with a text
>> placed beneath each marker, just make a custom icon with such a
>> label. If you place the label beneath the anchor point it will be
>> placed beneath the marker-position, if you don't use the iconAlignment
>> property of course.
>>
>> On Feb 19, 7:39 pm, cyrt <[email protected]> wrote:
>>
>> > Is it possible to define some kind of offset for placing a label below
>> > the 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
-~----------~----~----~----~------~----~------~--~---