Re: Newbie GMarker problem
You are calling get_icon() twice. Once when you call createMarker:
var marker = createMarker(point, label, html, get_icon(icon));
The second time inside createMarker:
// A function to create the marker and set up the event window
function createMarker(point,name,html, iconStr) {
// FF 1.5 fix
html = '<div style="white-space:nowrap;">' + html + '</div>';
var marker = new GMarker(point, get_icon(iconStr));
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
i++;
return marker;
}
I would probably just change the call to create marker to pass in the
string:
var marker = createMarker(point, label, html, icon);
But either way will work.
-- Larry
0 Comments:
Yorum Gönder
<< Home