Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an google map InfoWindow be made draggable (v3)?

Can' see anything in the documentation to be able to make an InfoWindow draggable in v3 of the google maps API. Am I missing something?

I'm basically trying to show some html when a marker is clicked, but sometimes I want to see stuff behind the html while it's open. So the intuitive thought was to be able to move he InfoWindow.

Any ideas?

like image 738
Jose Avatar asked Nov 29 '25 23:11

Jose


1 Answers

There isn't an event on the infowindow for 'dragged' or anything like that. The infowindow is anchored to a marker. So what you could perhaps do is create a non-visible marker (at the same location as your real marker). And then have an overlay layer overlapping the infowindow. So when you drag the overlay, you also update the position of the non-visible marker, thus moving the infowindow at the same time. Sounds like more effort than it's worth to me.

like image 123
duncan Avatar answered Dec 02 '25 04:12

duncan