Hi JCT-

I believe this demo does everything you're looking for:
http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/XmlParsingDemo/XmlParsingDemo.html

- pamela

On Fri, Oct 3, 2008 at 10:10 AM, JCT <[EMAIL PROTECTED]> wrote:
>
> Yes, it compiles, but when i click on the marker gives an error.
>
> The examples of icon customization don't show how use an image (like a
> PNG).
>
> Could you please post the correct code for the openInfoWindow and the
> marker customization?
>
> Thank you.
>
> On 3 Out, 18:01, "pamela (Google Employee)" <[EMAIL PROTECTED]>
> wrote:
>> Hi JCT-
>>
>> Does that code compile? You should be passing a latlng into the
>> openInfoWindow function, or just using the marker.openInfoWindow. In
>> addition, you should use the icon property to specify a custom icon.
>> There's information about that in the 
>> documentation:http://code.google.com/apis/maps/documentation/flash/overlays.html#Ic...
>>
>> There are also tons of examples in the demo gallery.
>>
>> - pamela
>>
>> On Fri, Oct 3, 2008 at 9:56 AM, JCT <[EMAIL PROTECTED]> wrote:
>>
>> > Hi!
>>
>> > I created a Google Map with javascript and it all worked fine. Now i'm
>> > traying to make the same map on Flash (without Flex) and i'm having
>> > some problems:
>>
>> > - Can't change the default market icon;
>> > - OpenInfoWindow doesn't work when i click on the markers;
>>
>> > Here is the Actionscript code:
>>
>> > import com.google.maps.Map;
>> > import com.google.maps.LatLng;
>> > import com.google.maps.MapEvent;
>> > import com.google.maps.MapType;
>> > import com.google.maps.MapMouseEvent;
>> > import com.google.maps.overlays.Marker;
>> > import com.google.maps.overlays.MarkerOptions;
>> > import com.google.maps.controls.MapTypeControl;
>> > import com.google.maps.controls.ZoomControl;
>> > import com.google.maps.controls.PositionControl;
>> > import com.google.maps.InfoWindowOptions;
>> > import com.google.maps.styles.FillStyle;
>> > import com.google.maps.styles.StrokeStyle;
>>
>> > var map:Map = new Map();
>> > map.key = "my key";
>> > map.setSize(new Point(stage.stageWidth, stage.stageHeight));
>> > map.addEventListener(MapEvent.MAP_READY, onMapReady);
>> > this.addChild(map);
>>
>> > function onMapReady(event:Event):void {
>> >        map.setCenter(new LatLng(39.600000,-8.110685), 6,
>> > MapType.NORMAL_MAP_TYPE);
>> >        map.addControl(new ZoomControl());
>> >        map.addControl(new PositionControl());
>> >        map.addControl(new MapTypeControl());
>>
>> >        var myOptions:MarkerOptions = new MarkerOptions({
>> >          tooltip: "This is a marker",
>> >          hasShadow: true,
>> >          clickable: true,
>> >          draggable: false,
>> >          gravity: 0.5
>> >        });
>>
>> >        // Create a marker with an info window thats completely customized
>> >        function createMarker(mlat, mlng, mloja) {
>> >                var marker = new Marker(new LatLng(mlat, mlng), myOptions);
>> >                marker.addEventListener(MapMouseEvent.CLICK,
>> > function(e:MapMouseEvent):void {;
>> >                var myTitle:String = "<b>" + mloja + "</b>";
>> >                var myContent:String = "test";
>> >                map.openInfoWindow(marker, new InfoWindowOptions({titleHTML:
>> > myTitle, contentHTML: myContent}));
>> >                });
>> >                map.addOverlay(marker);
>> >        }
>>
>> >        createMarker(38.74185, -9.23267, "Amadora");
>> >        createMarker(41.18145, -8.65833, "Matosinhos");
>> > }
>>
>> > Please help me. Can't find the solution to this problems on the Flash
>> > API documentation.
> >
>

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