impress-org / google-maps-builder

One Google Maps plugin to rule them all. Google Maps Builder is intuitive, sleek, powerful and easy to use. Forget the rest, use the best.
https://wordpress.org/plugins/google-maps-builder/
32 stars 9 forks source link

Mashups info window cropped when marker is too close to top of frame #108

Open kevinwhoffman opened 9 years ago

kevinwhoffman commented 9 years ago

Following is based off what I see at http://mapsbuilder.wordimpress.com/demo/mashups/

When clicking a marker near the top of the frame, the map repositions itself but not far enough to contain the entirety of the info window. I think what is happening is the reposition occurs before all of the content is loaded, so it doesn't know how far north it needs to move in order to reveal the entire info window. See below:

info-window-cropped-1

At this point the reposition has already occurred, so when the content loads in a second later, it becomes cropped.

info-window-cropped-2

Can you wait to fire the reposition until after the content has loaded?

DevinWalker commented 9 years ago

Yeah I noticed that too. Should it center on the map or just scroll into view?

kevinwhoffman commented 9 years ago

I prefer centering it. With that said, I don't think centering is as important at far out zoom levels, but at closer zoom levels, centering the marker allows you to see more of the surrounding context. You can see that behavior here: http://celebrateditaly.com/map/

kevinwhoffman commented 9 years ago

Centering also better ensures that the info window doesn't overlap controls when clicking a marker along the edge of the map.