Chingu,
I guess I didn't explain it clearly enough. You can use exactly the
same type of custom overlay as Pamela's example but instead of having
listeners to add and remove it on mouseover and mouseout, you add it
once at the same time as you add the marker. If you need to remove the
marker, you can remove the custom overlay at the same time too. I have
edited Pamela's onMapReady function below to demonstrate.

    private function onMapReady(event:Event):void {
        map.setCenter(new LatLng(37.4419, -122.1419), 13,
MapType.NORMAL_MAP_TYPE);

        // Add 5 markers to the map at random locations
         var bounds:LatLngBounds = map.getLatLngBounds();
        var southWest:LatLng = bounds.getSouthWest();
        var northEast:LatLng = bounds.getNorthEast();
        var lngSpan:Number = northEast.lng() - southWest.lng();
        var latSpan:Number = northEast.lat() - southWest.lat();
        for (var i:Number = 0; i < 5; i++) {
            var latlng:LatLng = new LatLng(southWest.lat() + latSpan *
Math.random(),
                                     southWest.lng() + lngSpan *
Math.random());
            map.addOverlay(new Marker(latlng));
            map.addOverlay(new TooltipOverlay(latlng, latlng.toString
()));
        }
    }

Note that I have moved this discussion back to the group so that
others who may have the same question can see the full conversation.
Please use the "Reply" link, not "Reply to author" unless you really
need to move it offline.

On Thu, Aug 27, 2009 at 10:42 PM, Chingu <[email protected]>
wrote:

    Hi Helen I wanted the labels to attach with the markers without
doing
    mouseover the markers which means that it will always be showing
the
    labels.
    So I can't use tooltip to do it :). Is it possible to do it or
there's
    no such thing lolx.

    Thank u very much ^_^



On Aug 27, 10:03 am, helen <[email protected]> wrote:
> You could create a custom overlay class (extend OverlayBase) that
> contains a text field with the lat/lng value and position it on the
> map relative to your marker point. See this example  by Pamela Fox
> from the 
> gallery:http://code.google.com/apis/maps/documentation/flash/demogallery.html...
>
> Just add your custom overlay when you add the marker, and likewise
> remove it if you remove the marker.
>
> Helen
>
> On Aug 26, 10:19 pm, Chingu <[email protected]> wrote:
>
> > Hi everyone,
>
> > I would like to create labels beside every individual markers to show
> > latitude and longitude values so that the users can see without
> > clicking or doing rollover to the markers. Is it possible to do it?
>
> > Many Thanks.
--~--~---------~--~----~------------~-------~--~----~
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