getElementsByTagName returns an array - even if there is only 1
result.
Try changing lines 23 and 24 to:

var latlng = new
google.maps.LatLng(parseFloat(markers[i].getElementsByTagName("clubLat")
[0].firstChild.data),
parseFloat(markers[i].getElementsByTagName("clubLong")
[0].firstChild.data));
var marker = createMarker(markers[i].getElementsByTagName("clubName")
[0].firstChild.data, latlng);

Chad Killingsworth

On Mar 13, 9:48 am, Edward <[email protected]> wrote:
> I have looked at the demo of leading markers from xml where the data
> is held as attributes:
>
> http://gmaps-samples-v3.googlecode.com/svn/trunk/xmlparsing/downloadu...
>
> but am trying to adapt it work with elements. I can get it to work in
> API V2:
>
> http://www.edwardshephard.net/bncaravantest/maptest.html
>
> but cannot adapt this to V3:
>
> http://www.edwardshephard.net/bncaravantest/maptest2.html
>
> XML is here:http://www.edwardshephard.net/bncaravantest/clubdata.xml
>
> Am not that good at javascript so may have typed a load of nonsense!
> can anyone help please?
>
> Thanks E

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to