I have a question I would like to mark a point on a map (I know how to do it and it works). Then I want to write in InfoWindow everything about this point. How can I do it?
My add marker function:
function placeMarker(location) {
if (marker != null) {
removeMarker(marker);
}
marker = new google.maps.Marker({
position: location,
title: "aaaa",
map: map
});
google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
});
infowindow = new google.maps.InfoWindow({
content: 'Hello world'
});
map.setCenter(location);
setLatLng(location.lat, location.lng, place);
}
I use it:
google.maps.event.addListener(map, 'click', function (event) {
placeMarker(event.latLng);
});
Is anywhere the specyfication where I can find what is it the EVENT object and what kind of properties it has?
latLngis the only property the event (currently) has. See reference.