I seem to be frustrating you. I apologize, but I do not understand what I am looking at. That is why I'm asking questions, hoping someone can help me work through this so I can understand. I understand if I'm too frustrating to help and will not be offended if you stop helping me.
When I add '<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a><br>' to my code here:
function createMarker(googlemap_ltgooglemap_ln, street) {
var html =
'<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + street + '<\/a><br>'; // info window contents
sidebarInfo += html;
// add this line after the html var declaration:
document.getElementById("sidebar").innerHTML=sidebarInfo;
var marker = new google.maps.Marker({
map: map,
position: googlemap_ltgooglemap_ln
});
google.maps.event.addListener(marker, 'click', function() {
infoWindow.setContent(html);
infoWindow.open(map, marker);
});
markers.push(marker);
}
(street being the name of my field, not name), and do a search, the map doesn't move, nothing is listed in the sidebar, the drop down only has 1 property listed, and I get gmarkers is undefined in my firebug console.
I don't know what I need to change gmarkers to to match my code, nor do I know if that is the correct way to make my list link to the map. I don't know what gmarkers is. Is that the code I need to make my list link? I don't know.
Comparing the code of the sample map and my map doesn't make sense to me. The code is different than what I have, and I don't know what I'm supposed to look for. When I tried to copy the sample code and put it on my server, the map didn't have anything listed in the sidebar and no markers, so I don't know what I'm missing.