I'm not gonna address that issue right now, I have run accross another problem now. I cant get the xsl file to style my info window. When insert the code: openInfoWindowXslt(description, "styles.xsl"); It breaks the entire infoWindow and doesnt open
Here is my code and links to relevant pages: http://chilternstravel.co.uk/xmlTest.aspx http://chilternstravel.co.uk/test.xml http://chilternstravel.co.uk/styles.xsl and here is the code "Javascript": ------------------------------------------------------------------------------------------------------------ function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById ("map_canvas")); map.setCenter(new GLatLng(51.70278, -0.70587), 4); // SET UP MARKER POSITIONS function createMarker(point, description) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowXslt(description, "styles.xsl"); }); return marker; } var request = GXmlHttp.create(); request.open("GET", "test.xml", true); request.onreadystatechange = function() { if (request.readyState == 4) { var xmlDoc = request.responseXML; var points = xmlDoc.documentElement.getElementsByTagName("point"); var descriptions = xmlDoc.documentElement.getElementsByTagName("description"); var tests = xmlDoc.documentElement.getElementsByTagName("test"); for (var i = 0; i < tests.length; i++) { var point = new GLatLng(parseFloat(points [i].getAttribute("lat")), parseFloat(points[i].getAttribute("lng"))); var marker = createMarker(point, descriptions[i]); map.addOverlay(marker); } } } request.send(null); } } ------------------------------------------------------------------------ xml code: ------------------------------------------------------------------------ <?xml version="1.0" encoding="utf-8" ?> <tests> <test> <point lng="-0.89704" lat="51.67939" /> <description> <name>The Sir Charles Napier</name> </description> </test> </tests> ------------------------------------------------------------------------ xsl code: ------------------------------------------------------------------------ <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates select="tests/test/description" /> </xsl:template> <xsl:template match="description"> <span style="color:red;"> <xsl:value-of select="name" /> </span> </xsl:template> </xsl:stylesheet> ------------------------------------------------------------------------ any ideas? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
