I read google doc on markers and tried to integrate the sample code into mine. But it doesn't work. The markers don't display. What's wrong with my code? Thank you!
function addMarker(place)
{
// TODO
var myLatLng = {lat: parseFloat(place.latitude), lng: parseFloat(place.longitude)};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatLng
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: place.admin_name2 + ", " + place.admin_name1
});
markers.push(marker);
}