I'm looking to do the same thing, just haven't gotten around to it
yet, or I'd tell you how exactly. But basically, I think all you need
to do is set up the div where you want the feedback, give it an ID
(let's call it "sidebar"), then, in the createMarker function, after
the "html" var is set up, change the innerHTML of that div to the
value of that html var:
createMarker():
...
var html = "<p><span style='font-weight:bold'>" + name + "</span><br/
>" + address1 + "<br />" + address2 + cityStateZip + "<br /></
p><p><span style='font-weight:bold'>" + phone + "</span></p>"; // info
window contents
// add this line after the html var declaration:
document.getElementById("sidebar").innerHTML=html;
var marker = new google.maps.Marker({
map: map,
...
Although, those markers are created in a loop, so you would probably
want to declare a global variable, store the HTML markup in that
variable (appending to it in each itteration), then change the
innerHTML all at once. Otherwise, you'd only see the details for the
last marker created. Maybe more like:
//global var
var sidebarInfo;
//in createMarker() add this line after the html var declaration:
sidebarInfo+=html;
//Then at the end of the downloadUrl() function, change out the
innerHTML:
document.getElementById("sidebar").innerHTML=sidebarInfo;
Of course, I could be all wrong... I'm a javascript noob. So follow at
your own risk.