/sites/all/modules/leaflet/leaflet.drupal.js

line 80:

if (this.map.center) {
if (Drupal.leaflet.bounds.length == 0) {
lMap.setView(new L.LatLng(this.map.center.lat, this.map.center.lon), this.map.settings.zoom);
}
Drupal.leaflet.fitbounds(lMap);

or it will center always and will not autozoom in (even if we chose "Use the center of the rectangle whose sides are defined by the left-most, right-most, top and bottom locations (this option is insensitive to location clusters)." in the view format settings
where do you send the data to this js file, because it would be much better to check for the centering type (eg type = 2 is for "Use the center of the rectangle whose sides ...")

line6:

$(settings.leaflet).each(function () {
Drupal.leaflet.bounds.length=0;

if using ajax based view (exposed form) we have to reset the bounds (and maybe more?)

Comments

rdeboer’s picture

Project: Leaflet » IP Geolocation Views & Maps
Version: 7.x-1.0-beta3 » 7.x-1.23

I believe this issue has a better home in the IPGV&M queue. Moving it over. Rik

dancor’s picture

but it is in the leaflet module?

rdeboer’s picture

Project: IP Geolocation Views & Maps » Leaflet
Version: 7.x-1.23 » 7.x-1.0-beta3

Actually, yes it is a Leaflet issue....
I got confused when I read:
"Use the center of the rectangle whose sides are defined by the left-most, right-most, top and bottom locations (this option is insensitive to location clusters)", which comes from IPGV&M.

Maybe this one falls somewhere between the two modules....

rdeboer’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Leaflet has changed considerably recently. Please reopen if still an issue.