When the markers are visible within a maximum zoom level are displayed regardless of padding from the edge of the container map is sufficient.
Otherwise this is not done when we press on a marker cluster, which instead performs well!

CommentFileSizeAuthor
#4 screen.png159.8 KBIdas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Idas created an issue. See original summary.

Idas’s picture

Issue summary: View changes
RdeBoer’s picture

@Idas,
Thank your for your feedback. I don't quite understand what you mean. Can you please clarify with some screenshots?
Rik

Idas’s picture

FileSize
159.8 KB

How can you see the x and y coordinates of the markers are correctly inside the div, but the icon of the marker don't.

mstrelan’s picture

I think what OP means is that the auto-zoom and centering can crop the map very close to the pin location. Usually most of the pin displays above the actual location. The upper-most pin will be mostly invisible as per the screenshot in #4. We need the auto-zoom to ensure all map markers fully fit within the map.

mstrelan’s picture

Something like this. Sorry I'm not sure if this already exists for Leaflet, I'm trying to find something similar for Google Maps.

map.fitBounds(bounds, {padding: [50, 50]});
http://jsfiddle.net/BC7q4/444/