Reputation: 344
I have Google map with markers.
I have shown a custom popup on marker click.Popup adjust its position as map is dragged, So to adjust its position i have used bound_changed event of Google maps.
Issue is:- bounds_changed event fire continuously as map dragged so i adjust popup position which is perfect for Desktop browser.But in mobile device this bounds_changes event fire only after drag is completed ,same as 'idle' event of Google maps. Here is link :- link
Upvotes: 0
Views: 617
Reputation: 7255
I faced this same problem a while back and had to use the center_changed event instead as I needed to restrict the users visible bounds if they tried to drag the map out of a certain visible area.
I am actually switching between using the bounds_changed and center_changed event depending on whether the user is on a desktop or mobile device. Are you able to do this in whatever framework you are using?
Upvotes: 1