Closed (fixed)
Project:
Leaflet
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2014 at 19:18 UTC
Updated:
17 Aug 2015 at 05:41 UTC
Jump to comment: Most recent
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
Comment #1
marc.groth commentedI 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.
Comment #2
duncan.moo commentedI had the same issue and can confirm that updating ip_geoloc to the latest version resolved the issue.
Comment #3
rdeboerClosing based on the above discussion.
RIk