hi,
for me dont work, I'm using the swc version 1.9 for CS3.
and return of method MarkerOptions.getDefaultOptions() is
MarkerOptions:
{ strokeStyle: StrokeStyle: {
thickness: 2
color: 0
alpha: 1
pixelHinting: false
}
fillStyle: FillStyle: {
color: 16741994
alpha: 1
gradient: null
}
label: null
labelFormat: [object TextFormat]
tooltip: null
radius: 9
hasShadow: true
clickable: null
draggable: false
gravity: 0.8
icon: null
iconAlignment: null
iconOffset: null }
I dont have the distanceScaling atribute.
do you know what be?
On Jul 7, 3:52 pm, I_Watkins <[email protected]> wrote:
> Try this code, it redraws the marker as you zoom and out:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute"
> xmlns:maps="com.google.maps.*"
> width="100%"
> height="100%">
>
> <mx:Script>
> <![CDATA[
> import com.google.maps.Map;
> import com.google.maps.LatLng;
> import com.google.maps.MapEvent;
> import com.google.maps.MapZoomEvent;
> import com.google.maps.MapType;
> import com.google.maps.overlays.Marker;
> import com.google.maps.overlays.MarkerOptions;
> import com.google.maps.MapType;
> import com.google.maps.LatLng;
> import com.google.maps.styles.FillStyle;
> import com.google.maps.styles.StrokeStyle;
> import com.google.maps.controls.ZoomControl;
> import com.google.maps.controls.PositionControl;
>
> private function onMapReady(event:Event):void
> {
> map.addControl(new ZoomControl());
> map.addControl(new PositionControl());
> map.addEventListener(MapZoomEvent.ZOOM_CHANGED,
> resizeMarkers);
> map.setCenter(new LatLng(48.858842, 2.346997), 14,
> MapType.NORMAL_MAP_TYPE);
>
> var markerA:Marker = new Marker(
> new LatLng(48.858842, 2.346997),
> new MarkerOptions({
> radius: 4 + map.getZoom(),
> hasShadow: true
> })
> );
> map.addOverlay(markerA);
> }
>
> private function resizeMarkers(event: MapZoomEvent):void
> {
> map.clearOverlays();
>
> var markerA:Marker = new Marker(
> new LatLng(48.858842, 2.346997),
> new MarkerOptions({
> radius: 4 + map.getZoom(),
> hasShadow: true,
> distanceScaling: true
> })
> );
> map.addOverlay(markerA);
> }
> ]]>
> </mx:Script>
> <maps:Map id="map"
> left="10"
> right="10"
> top="10"
> bottom="10"
> mapevent_mapready="onMapReady(event)"
>
> key="ABQIAAAAwZG5Tk3XmQjBsSYWpMhjDRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTVKRUEo_DmcvENsSXCOhDRjbpfXw"
> /
>
> </mx:Application>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---