So, I have a V3 card that initializes as follows:
function init() { var mapCenter = new google.maps.LatLng(51.5081289,-0.128005); var map = new google.maps.Map(document.getElementById('map'), { 'zoom': 6, 'center': mapCenter, 'mapTypeId': google.maps.MapTypeId.ROADMAP, panControl: false, mapTypeControl: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.LEFT_TOP }, });
and marker loads that look like this:
var marker25837500 = new google.maps.Marker({ map: map, pop_title: 'blah blah', pop_wind: 'more blah', zIndex: 999, icon: 'images/map_icons/s6.png' }); google.maps.event.addListener(marker25837500, 'click', onMarkerClick);
and finally, I have a function to open infowindow on click of each manufacturer:
var infoWindow = new google.maps.InfoWindow; var onMarkerClick = OpenInfoWindow; function OpenInfoWindow() { var marker = this; infoWindow.setContent('<h3>' + marker.pop_title + '</h3>' + marker.pop_body); infoWindow.open(map, marker); }; google.maps.event.addListener(map, 'click', function() { infoWindow.close(); });
My question is: what do I need to do to make a specific marker (say marker25837500), show it infowindow when it clicks inside the page - maybe something like:
<div id="marker25837500">click to see infoWindow!</div>
I am sure it is easy, but I just see my way, although it is!
thanks