Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function showInfoWindow(marker) {
- var infoWindow = new google.maps.InfoWindow({
- content: (marker.title
- + '<br><img id="thumbnail" src = "img/'
- + marker.title.toLowerCase()
- + '.jpg"><br>'
- + '<ul>'
- + '<li id="infoWindowStart">Start from here</li>'
- + '<li id="infoWindowEnd">End here</li>'
- + '</ul>'
- )
- });
- infoWindow.open(map, marker);
- // then try to add a listener to the newly-created "infoWindowStart"
- document.getElementById("infoWindowStart").addEventListener("click",function(){
- console.log("We're going from here")
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement