I haven't tried this but try surrounding your contentHTML with single
quotes:

var optionsA:InfoWindowOptions = new InfoWindowOptions({
                  contentHTML: '<img src="com2-1.jpg" width="80"
height="80" border="0" alt="ODNR"/>',
                  width: 300,
                  height: 120,
                  drawDefaultFrame: true});

as string is expected

Paul


On Jan 19, 5:25 pm, marco <[email protected]> wrote:
> Can someone explain to me why i get an empty infoWindow with the
> following script?
>
> //first attempt at Google Maps API for Flash//
> import com.google.maps.LatLng;
> import com.google.maps.Map;
> import com.google.maps.MapEvent;
> import com.google.maps.MapMouseEvent;
> import com.google.maps.MapType;
> import com.google.maps.MapOptions;
> import com.google.maps.InfoWindowOptions;
> import com.google.maps.controls.ZoomControl;
> import com.google.maps.controls.PositionControl;
> import com.google.maps.controls.MapTypeControl;
> import com.google.maps.overlays.Marker;
> import com.google.maps.overlays.MarkerOptions;
> import com.google.maps.styles.StrokeStyle;
> import com.google.maps.styles.FillStyle;
>
> var map:Map = new Map();
> map.key = "*****";
> map.setSize(new Point(stage.stageWidth, stage.stageHeight));
> map.addEventListener(MapEvent.MAP_PREINITIALIZE, onMapPreinitialize);
> map.addEventListener(MapEvent.MAP_READY, onMapReady);
> this.addChild(map);
>
> function onMapPreinitialize(event:MapEvent):void {
>         var myMapOptions:MapOptions = new MapOptions();
>         myMapOptions.zoom = 16;
>         myMapOptions.center = new LatLng(41.513558,-81.599654);
>         myMapOptions.mapType = MapType.NORMAL_MAP_TYPE;
>         this.map.setInitOptions(myMapOptions);}
>
> function onMapReady(event:MapEvent):void {
>         map.addControl(new ZoomControl());
>         map.addControl(new PositionControl());
>         map.addControl(new MapTypeControl());
>         var markerA:Marker = new Marker(
>               new LatLng(41.5123, -81.599400),
>               new MarkerOptions({
>                   strokeStyle: new StrokeStyle({color: 0x010101}),
>                   fillStyle: new FillStyle({color: 0xFF0000, alpha: 1}),
>                   radius: 10,
>                   hasShadow: true}));
>         var optionsA:InfoWindowOptions = new InfoWindowOptions({
>                   contentHTML: <img src="com2-1.jpg" width="80" height="80"
> border="0" alt="ODNR"/>,
>                   width: 300,
>                   height: 120,
>                   drawDefaultFrame: true});
>         markerA.addEventListener(MapMouseEvent.CLICK, function
> (event:Event):void {
>         markerA.openInfoWindow(optionsA)});
>         map.addOverlay(markerA);
>
> }
>
> I'm not using Flex, would that make a huge difference? I've seen some
> posts that discourage using HTML in Flash, but I'm just trying to do
> some very basic stuff here... seems like this should work. What am i
> missing?
-- 
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