I am using the following code to show a jQuery UI dialog when the mouse is clicked on the map:
GEvent.addListener(map, "click", clicked);
function clicked(overlay, latlng) {
$('#dialog').show();
};
Both clicked function and show() function works fine on their own but when I want to open dialog box by clicking on the map it does not. Any ideas?
You may want to check out the following example:
Screenshot:
alt text http://img517.imageshack.us/img517/643/jquerygoogle.png