From GamingWiki
Line 49: | Line 49: | ||
function addMarkerByAddress(address, title, description) { | function addMarkerByAddress(address, title, description) { | ||
if (geocoder) { | if (geocoder) { | ||
− | geocoder.getLatLng(address, function(latlng) { | + | geocoder.getLatLng({request:address, callback:function(latlng) { |
if (!latlng) { | if (!latlng) { | ||
alert(address + " not found"); | alert(address + " not found"); | ||
Line 56: | Line 56: | ||
google.maps.event.addListener(marker, "click", function() { infowindow.open(map,marker); }); | google.maps.event.addListener(marker, "click", function() { infowindow.open(map,marker); }); | ||
} | } | ||
− | }); | + | }}); |
} | } | ||
} | } |
Revision as of 01:10, 25 October 2010