> Its the way it is displayed that i cant get to work. the html is
> literally being displayed. my xml document has a <br /> tag in it, and
> its being displayed on the page, and not actually breaking.
I'm going to point you back at that tutorial again ... after all, it
works and yours doesn't. So what's different?
You are using -
var descriptions = xmlDoc.documentElement.getElementsByTagName
("description");
so that descriptions[i] is an array of XML elements, each of which is
like
<description>
<name><![CDATA[ <table><tr><td>Sir Charles Napier</td><tr></
table>]]></name>
<address> .... etc.
When you call your createMarker function with descriptions[i], it sets
up an infowindow whose contents are a set of XML elements. That isn't
valid HTML, so how a browser will handle it who knows, it'll do the
best it can.
You're going to have to do more work with your descriptions[i] XML
chunk to turn it into valid HTML - extracting each XML element, like
<name>, <address>, etc. and concatenating them into a string,
interspersed with any HTML you want like <br />.
The turorial suggests using this method -
var html = GXml.value(somestuff[i].getElementsByTagName("....
cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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?hl=en
-~----------~----~----~----~------~----~------~--~---