I spoke too quickly about having resolved my issue, or alternatively, I've realized that I have another issue. The above solution appears to work in Chrome and Safari, but produces an error in IE6, IE7 and IE8, and in Firefox (3.5.5) it just seems to be constantly loading and nothing shows on the screen.
Any thoughts on why it won't work in those other browsers? Thanks! On Dec 3, 1:53 pm, whimsy <[email protected]> wrote: > I seem to have addressed the issue by re-calling the data from xml in > creating and calling the info window, rather than referencing the > marker and another variable to fill and place the window. I've > updated the xml and xsl files with the new code. > > So I replaced this code: > > var contentString = '<xsl:value-of select="name"/>'; > var infowindow = new google.maps.InfoWindow({ > content: contentString > }); > var stnLatLng = new google.maps.LatLng(<xsl:value-of > select="lat"/>,<xsl:value-of select="long"/>); > > var marker = new google.maps.Marker({ > position: stnLatLng, > map: map, > title:"<xsl:value-of select="name"/>" > }); > google.maps.event.addListener(marker, 'click', function() { > infowindow.open(map,marker); > }); > > with this: > > var stnLatLng = new google.maps.LatLng(<xsl:value-of select="lat"/ > > >,<xsl:value-of select="long"/>); > > var marker = new google.maps.Marker({ > position: stnLatLng, > map: map, > title:"<xsl:value-of select="name"/>" > }); > > google.maps.event.addListener(marker, 'click', function() { > var infowindow = new google.maps.InfoWindow({ > position: new google.maps.LatLng(<xsl:value-of > select="lat"/>,<xsl:value-of select="long"/>), > > content: "<xsl:value-of select="name"/>" > }); > infowindow.open(map); > }); > > and now it seems to work. -- 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.
