SphynxTech
SphynxTech

Reputation: 1849

Adding an id to an infowindow (google maps API)

I have a map with infowindows. In my code, I open infowindows and I want to add events, like divs, on this infowindows.

What I would like to now it's if it is possible to add an id to an infowindow (google.maps.InfoWindow({});) with javascript google's maps api 3.

I declare the infowindows like this:

var infowindow = new google.maps.InfoWindow({});
infowindow.setContent(
   '<p>TEST Stack overflow</p>'
   );

Upvotes: 1

Views: 2138

Answers (1)

user6929072
user6929072

Reputation:

Why don't you add an id to the tags which you are creating and then access them that way?

Look at the google example which references a string.

Google shows an example of the way in which they declare info windows

Upvotes: 2

Related Questions