On May 17, 1:28 pm, Southbayriders <[email protected]> wrote:
> I would like to modify this map:
>
> http://gmaps-samples-v3.googlecode.com/svn/trunk/xmlparsing/downloadu...
>
> How would I parse an additional element that I have added to my
> moredata.xml file?
An element or an attribute?
(note: this is not a mapping API question, it is an xml parsing
question)
>
> The code I think I need to modify is located in this section:
>
> for (var i = 0; i < markers.length; i++) {
> var latlng = new
> google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")),
> parseFloat(markers[i].getAttribute("lng")));
> var marker = createMarker(markers[i].getAttribute("name"), latlng);
these are attributes (name, lat, lng)
<marker name="Jackie" lat="37.427770" lng="-122.144841"/>
marker is an element. This particular marker element has no content.
-- Larry
>
> }
> });
>
> The additional element in my moredata.xml file is called 'thread'. How
> would I modify the above code to properly parse this additional
> element? I will want to use the element in this section of the code,
> after name:
>
> infowindow = new google.maps.InfoWindow({content: name});
>
> Thank you.
--
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.