Skip to content

Instantly share code, notes, and snippets.

@tgk
Created December 7, 2011 18:09
Show Gist options
  • Save tgk/1443894 to your computer and use it in GitHub Desktop.
Save tgk/1443894 to your computer and use it in GitHub Desktop.
$(function() {
var map, marker;
map = new google.maps.Map($("#map-canvas")[0], {
zoom: 1,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
map.setCenter(new google.maps.LatLng(0, 0));
marker = new google.maps.Marker({
position: new google.maps.LatLng(56, 32),
map: map
});
return google.maps.event.addListener(marker, "click", function(event) {
console.log("You clicked me");
return marker.setVisible(false);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment