I’m trying to make a button that sits inside the infowindow, opening another infowindow with different content, I already put the button inside the infowindow ..
I just need to make the button open another infowindow.
var marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(-8.729981,-63.878333),
icon: predio});
var contentimage = '</br> <input type="button" id="btn1" value="Fotos"/></div><</div><div><img src="images/gardenclub.png" width="460" height="240"/>'
var infowindow = new google.maps.InfoWindow({
content:contentimage
})
google.maps.event.addListener(marker,'click',function(){
infowindow.open(map,marker); });
var btn1=document.getElementById('btn1');
google.maps.event.addDomListener(btn1, 'click', function(){
I’m stuck here ..
appreciate the help
Are you trying to do something like this:
http://www.geocodezip.com/v3_polyline_example_geodesic_proj.html
One infowindow with link to the next, if you click on the link, it opens the “next” infowindow.
No reason the link couldn’t be a button.