Re: Place a dot on map and format text in "info window"
You are trying to open the marker with the openInfoWindow command,
which only accepts an HTML element. I think you might be better off
opening the info window with the openInfoWindowHtml, which accepts an
HTML string.
Try to replace your:
marker.openInfoWindow(map.getCenterLatLng(),
document.createTextNode("Living Art <br> 308 S.
Kenosha Ave."));
with
marker.openInfoWindowHtml("Living Art <br> 308 S. Kenosha Ave.");
This should open the info window when the map is loaded, but you will
not be able to click the marker later and get the infowindow. In this
case you would want to replace it with:
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Living Art <br> 308 S. Kenosha Ave.");
});
0 Comments:
Yorum Gönder
<< Home