Hi, Here's what I did to show infowindow on the markers.
I replaced your code
codevar sfLatlng = new google.maps.LatLng(placeData.geometry.location.lat, placeData.geometry.location.lng);
var marker = new google.maps.Marker({
position: sfLatlng,
map: map,
title: placeData.name,
/code
with
createMarker(placesData);
then created a function for createMarker
codefunction createMarker(place) {
var placeLoc = place.geometry.location;
var marker = new google.maps.Marker({
map: map,
position: place.geometry.location,
//icon: "http://maps.google.com/mapfiles/kml/paddle/blu-circle.png",
});
google.maps.event.addListener(marker, 'click', function() {
Code: Select all
infowindow = new google.maps.InfoWindow({content: '<div style="line-height:1.35;overflow:hidden;white-space:nowrap;">'+place.name+'</br>'+place.vicinity+'</br><a href="#">Get Directions</a>'+'</br><a href="">Visit</a>'+'<>'});
infowindow.open(map, this);
});
}/code
The links for Get Directions and Visit are still null..