I am getting this error in the js files at the following lines
L.TileLayerQuad = L.TileLayer.extend({
var container = L.DomUtil.get(this.mapId);

The status report of Drupal says

Leaflet 0.7.2
The Leaflet Javascript library is installed correctly. 26 maps available.
Why is this happening?

Comments

marc.groth’s picture

I was getting the same issue (despite getting it working on another server instance for a different project with the same set up). This is what I managed to debug:

1. The leaflet.js file is not being included as part of the page load. This is done by libraries_load() which is called in leaflet_build_map().
2. leaflet_build_map() is only called in the following functions throughout the module:
* leaflet_field_formatter_view(): For geofield_leaflet dislpay types
* class leaflet_views_plugin_style (render()): When using the leaflet_views module

Personally I am using the ip_geoloc module to output the map so am not using either of the above methods. However upgrading that module (and any others related to leaflet such as leaflet_more_maps and leaflet_markercluster) seemed to fix things for me. So maybe try that?

Otherwise just make sure that leaflet_build_map() is being called wherever you are trying to render the map, as that is where your error (and mine) seemed to be coming from.

duncan.moo’s picture

I had the same issue and can confirm that updating ip_geoloc to the latest version resolved the issue.

rdeboer’s picture

Status: Active » Closed (fixed)

Closing based on the above discussion.
RIk