Currently you're trying to open the infowindow before you've added the
new marker to the map.
Try:
function add()
{
document.getElementById('add').innerHTML = "Adding ...";
var center = map.getCenter();
var marker = new GMarker(center, {draggable: true});
GEvent.addListener(marker, "dragend", function(point) {
marker.openInfoWindowHtml("some text after drag-end");
});
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml("general text");
});
map.addOverlay(marker);
marker.openInfoWindowHtml("some welcome text");
}
Martin.
On 1 Sep, 11:31, Voldemort <[EMAIL PROTECTED]> wrote:
> The URL is:http://www.sdslabs.org/gmap/geoAdd.html
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---