I'm using leaflet with the views module patch, and the latest views + ctools.

Currently the views preview shows nothing at all, and the content pane comes up but only shows grey with zoom buttons - no map and no markers. It's set to OSM Mapnik, being fed about 20 records with geofield in views.

Is there something obvious I might have missed?

Comments

pvhee’s picture

Same problem here, a grey map appearing and no features are drawn on the map.

pvhee’s picture

Found the cause of this problem. Apparently, a bug in Leaflet presents the tiles from showing when there is the following CSS active:

img {
  max-width: 100%;
  max-height: 100%;
}

The trick is to offset this for Leaflet tiles

.leaflet-map-pane img {
  max-width: none;
  max-height: none;
}
pvhee’s picture

Status: Active » Closed (works as designed)

Closing the issue, as this won't be part of the module and now seems to be fixed in the Leaflet library.

mgifford’s picture

Title: Blank Grey Leaflet Pane » Add Documentation about image dimensions to avoide Blank Grey Leaflet Panes
Component: User interface » Documentation
Status: Closed (works as designed) » Active

Ahh.. But it should be added to the documentation. OpenLayers has this same issue, but it's a problem with many popular themes and something lots of folks will run into if it isn't better documented.

architectJpres’s picture

I was caught on this issue for a while.

It turned out when I geocoded the address field using google as the geocoder it did not save correctly and then nothing worked correctly.