I have been having a *hard* time getting leaflet working with the latest -dev modules and after further investigation and some fixes from #2152423: Leaflet Library 0.7.1: The version of the Leaflet library could not be detected to properly detect the new version string, I decided to try using stable packages minus drupal core.
The following stable packages are in used now:
- ctools
- entity
- geophp
- ip_geoloc
- leaflet (w/0.7.x library)
- leftlet_more_maps
- views
- views_php
- libraries
with only drupal core and geofield using latest -dev. I also like to note that leaflet_markerclusters only supports >=leaftlet-0.7 at the time of this writting but that's off topic as I am just trying to get a regular leaflet map showing. P.S gmaps and openlayers are working fine with ip_geoloc.
This is what I am getting with current stable leaflet in firebug console.
Uncaught Error: No value provided for variable {q} leaflet.js?mykzxp:6
(anonymous function) leaflet.js?mykzxp:6
o.Util.template leaflet.js?mykzxp:6
o.TileLayer.o.Class.extend.getTileUrl leaflet.js?mykzxp:7
o.TileLayer.o.Class.extend._loadTile leaflet.js?mykzxp:7
o.TileLayer.o.Class.extend._addTile leaflet.js?mykzxp:7
o.TileLayer.o.Class.extend._addTilesFromCenterOut leaflet.js?mykzxp:7
o.TileLayer.o.Class.extend._update leaflet.js?mykzxp:7
o.TileLayer.o.Class.extend.onAdd leaflet.js?mykzxp:6
o.Map.o.Class.extend._layerAdd leaflet.js?mykzxp:6
o.Map.o.Class.extend.eachLayer leaflet.js?mykzxp:6
o.Map.o.Class.extend._resetView leaflet.js?mykzxp:6
o.Map.include.setView leaflet.js?mykzxp:9
(anonymous function) leaflet.drupal.js?mykzxp:85
b.extend.each jquery.js?v=1.4.4:34
b.fn.b.each jquery.js?v=1.4.4:27
Drupal.behaviors.leaflet.attach leaflet.drupal.js?mykzxp:6
(anonymous function) drupal.js?mykzxp:76
b.extend.each jquery.js?v=1.4.4:33
Drupal.attachBehaviors drupal.js?mykzxp:74
(anonymous function) drupal.js?mykzxp:412
b.extend.ready jquery.js?v=1.4.4:30
u jquery.js?v=1.4.4:38
Seems like stable at least shows more debugging info that -dev. At this point it seems leaflet is not working with stable or development snapshots.
Comments
Comment #1
rdeboerThe {q} error occured when you selected Bing maps during the time that Leaflet was being changed. Maintainers of depending modules (Leaflet More Maps, IPGV&M, Leaflet MarkerCluster) weren't notified of the changes so it took a while to get it right.
As far as I know, today, any combination of 2, 3 or 4 of these modules work (with Leaflet JS 0.7.x) provided you use 7.x-1.x-dev versions of ALL modules used and also use Leaflet 7.x-1.x-dev.
NO NEED TO PATCH ANY OF THESE MODULES.
But refresh caches and re-save your View.
Rik
Comment #2
gcbComment #3
gcb