# XML Yahoo Maps API

**URL:** <https://forum.kirupa.com/t/xml-yahoo-maps-api/216100>\
**Category:** flash\
**Created:** [February 13, 2007, 7:53pm UTC](https://forum.kirupa.com/t/xml-yahoo-maps-api/216100 "2007-02-13T19:53:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lfc611](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lfc611](https://forum.kirupa.com/u/lfc611)\
**Post date:** [February 13, 2007, 7:53pm UTC](https://forum.kirupa.com/t/xml-yahoo-maps-api/216100/1 "2007-02-13T19:53:50Z")

</div>

hi, im having a little trouble with the maps api, im trying to make is so that the map reads addresses from an xml file and updates it on the map

```auto

this is the actionscript i have:
import com.yahoo.maps.markers.CustomPOIMarker;
import com.yahoo.maps.tools.PanTool;
import com.yahoo.maps.widgets.NavigatorWidget;
import com.yahoo.maps.widgets.SatelliteControlWidget;

var x:XML = new XML();
x.ignoreWhite = true;

var addresses:Array = new Array();
var headers:Array = new Array();
var captions:Array = new Array();
var infos:Array = new Array();
var whoIsOn:Number;

myMap.addEventListener(com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZE, onInitMap);

function onInitMap(eventData) {
    var navWidget = new NavigatorWidget("closed"); 
      myMap.addWidget(navWidget);
    myMap.addWidget(new SatelliteControlWidget());
    var panTool = new PanTool();
    myMap.addTool(panTool, true);
    
x.onLoad = function() {
        var photos:Array = this.firstChild.childNodes;
        for(i=0;i<photos.length;i++){
            addresses.push(photos*.attributes.address);
            headers.push(photos*.attributes.header);
            captions.push(photos*.attributes.caption);
            infos.push(photos*.attributes.info);         
        }
            var mainLocation = addresses[j];
            myMap.setCenterByAddress(mainLocation, 0);
            myMarkerData = {index:headers[j], title:captions[j], description:infos[j], markerColor:0x990099, strokeColor:0xFFFF00};
    }
}
x.load("test.xml");

```

and this is the XML:

```auto

<?xml version="1.0" encoding="ISO-8859-1"?>

<slideshow>
    <photo address="1688 E Oakland Park Blvd, Fort Lauderdale, FL 33334" header="Sale" caption="3000SqFt 3/3" info="For more info please call: xxx.xxx.xxxx" />
    <photo address="4015 West Palm Aire Dr., Pompano Beach, FL 33069" header="Sale" caption="2600SqFt 2/3" info="For more info please call: xxx.xxx.xxxx" />
    <photo address="3250 W Commercial Blvd., Fort Lauderdale, FL 33309" header="Sale" caption="1500SqFt 3/3" info="For more info please call: xxx.xxx.xxxx" />
</slideshow>

```

any help will be greatly appreciated  
Thank You
