I have a content type called locations with a geofield. There are 3 locations. The idea is to show a block of each location with its own map in the sidebar of a contact us page. I have a view that creates a block that lists the locations. I've tried Content, Fields and Rendered Entity for displaying the Leaflet maps using the Leaflet field formatter. The three separate Leaflet maps do display, but only the first has the marker centered properly. The other two require you to zoom way out to see the marker, which is way below the center. It's like the centering isn't resetting when subsequent maps are displaying. Any ideas as to how this might be resolved?

Comments

itamair’s picture

Have a look to this: https://drupal.org/node/2056551

mgifford’s picture

@itamair is this a duplicate?

cameron prince’s picture

Status: Active » Closed (duplicate)

It is indeed...

dasjo’s picture

Issue summary: View changes
Status: Closed (duplicate) » Needs review
StatusFileSize
new5.2 KB

i had a look at #2056551: (my) Improvements for multiple Leaflet maps (fit bounds), interactions from outside of the map & View AJAX calls but didn't really understand the approach taken there.

attached is a patch that moves the global bounds array into the map configuration. fixes the problem in my case.

levelos’s picture

Status: Needs review » Fixed

Thanks dasjo, committed in 1eb92e1.

gcb’s picture

Status: Fixed » Closed (fixed)