hi,

On this line:

var html:String = image + "<b> <br/>" + name + "</b> <br/>" +
address;

try tweaking to include the html <img> tag. something like:

var html:String = "<img src=\"" + image + "\"" + "/><b> <br/>" + name
+ "</b> <br/>" +
address;

I am not 100% positive that <img> tags are acceptable as 'contentHTML'
but am pretty sure. If not, you could switch over and use the
'customContent' property.
-Joe

On Jan 24, 9:56 am, mgrane <[email protected]> wrote:
> Hi, Im a novice with as3 and I have been working on this map for
> several months:http://quetzalhost.com/MapsTest/
> I have come this far using all the examples an advices I have found in
> this group, its been really help full. Im trying to insert images in
> the info window but i only get text. Could anyone guide me on whats
> happening?
> I really need the help. Thanks
>
> function onMapReady(event:Event):void {
>         map.enableScrollWheelZoom();
>         map.enableContinuousZoom();
>         map.setCenter(new LatLng(9.934697,-84.142056), 15,
> MapType.PHYSICAL_MAP_TYPE);
>         map.addControl(new ZoomControl());
>         map.addControl(new MapTypeControl());
>         map.addControl(new OverviewMapControl());
>         map.addControl(new PositionControl());
>
> //Url request
>         var xmlString:URLRequest=new URLRequest("markers.xml");
>         var xmlLoader:URLLoader=new URLLoader(xmlString);
>         xmlLoader.addEventListener("complete", readXml);
>
> }
>
> //Read and loop Xml
> function readXml(event:Event):void{
>   var markersXML:XML = new XML(event.target.data);
>   var markers:XMLList = markersXML.marker;
>   var markersCount:int = markers.length();
>
>   for (var i:Number = 0; i < markersCount; i++) {
>     var marker:XML = markers[i];
>         var image:String = mark...@image;
>     var name:String = mark...@name;
>     var address:String = mark...@address;
>     var type:String = mark...@type;
>         var imageName:String = mark...@imagename;
>     var latlng:LatLng = new LatLng(mark...@lat, mark...@lng);
>       createMarker(latlng,image, name, i, address, type, imageName);
>     }
>
> }
>
> //Create Markers
> function createMarker(latlng:LatLng, image:String,
> name:String ,iconIndex:int , address:String, type:String,
> imageName:String):void {
>   var testLoader:Loader = new Loader();
>   var urlRequest:URLRequest = new URLRequest(imagesPath+imageName);
>   testLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
>   function(e:Event):void {
>     var markerOptions:MarkerOptions = new MarkerOptions({});
>     markerOptions.icon = testLoader;
>
>     var marker:Marker = new Marker(latlng, markerOptions);
>     var html:String = image + "<b> <br/>" + name + "</b> <br/>" +
> address;
>     marker.addEventListener(MapMouseEvent.CLICK,
>         function(e:MapMouseEvent):void {
>         marker.openInfoWindow(new InfoWindowOptions
> ({contentHTML:html}));
>     });
>
>     categories[type].markers.push(marker);
>     map.addOverlay(marker);
>   });
>   testLoader.load(urlRequest);
>
> }
>
> ========== marker.xml================
>
> <markers>
> <marker name="Inka Grill" image="bac.jpg" address="Centro Comercial
> Paco" lat="9.93066" lng="-84.150338" type="restaurante"
> imageName="inka.gif" />
> <marker name="Spoon" image="bac.png" address="Plaza Embajada"
> lat="9.930512" lng="-84.146615" type="restaurante"
> imageName="spoon.gif" />
> <marker name="Pizza Hut" image="bac.png" address="1225 1st Ave,
> Seattle, WA" lat="9.932102" lng="-84.128371" type="restaurante"
> imageName="pizzaHut.gif" />
> <marker name="Bac San Jose" image="bac.png" address="Frente a Centro
> Comercial Paco" lat="9.93204" lng="-84.153909" type="banco"
> imageName="bac.gif" />
> <marker name="Hospital Cima" image="bac.png" address="Escazu"
> lat="9.939833" lng="-84.144351" type="hospital" imageName="cima.gif" /
>
> <marker name="Farmacia Fischel" image="bac.png" address="Frente Centro
> Comercial Paco" lat="9.931887" lng="-84.149453" type="farmacia"
> imageName="fischel.gif" />
> <marker name="Parada de Taxis" image="bac.png" address= "Frente a
> Hipermás" lat="9.934581" lng="-84.129503" type="taxi"
> imageName="taxi.gif" />
> <marker name="Hotel Maria Alexandra" image="bac.png" address="Urb.
> Trejos Montealegre" lat="9.930982" lng="-84.133059" type="hotel"
> imageName="mariaAlexandra.gif" />
> <marker name="Hipermas" image="bac.png" address="Frente a Trejos
> Montealegre" lat="9.935119" lng="-84.12975" type="supermercado"
> imageName="hipermas.gif" />
> <marker name="Automercado" image="bac.png" address="Plaza Atlantis"
> lat="9.927436" lng="-84.133537" type="supermercado"
> imageName="automercado.gif" />
> </markers>

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