Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#4 | screen.png | 159.8 KB | Idas |
Comments
Comment #2
Idas CreditAttribution: Idas commentedComment #3
RdeBoer@Idas,
Thank your for your feedback. I don't quite understand what you mean. Can you please clarify with some screenshots?
Rik
Comment #4
Idas CreditAttribution: Idas commentedHow can you see the x and y coordinates of the markers are correctly inside the div, but the icon of the marker don't.
Comment #5
mstrelan CreditAttribution: mstrelan commentedI 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.
Comment #6
mstrelan CreditAttribution: mstrelan commentedSomething 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/