/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
Comment #1
rdeboerI believe this issue has a better home in the IPGV&M queue. Moving it over. Rik
Comment #2
dancor commentedbut it is in the leaflet module?
Comment #3
rdeboerActually, 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....
Comment #4
rdeboerLeaflet has changed considerably recently. Please reopen if still an issue.