You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anyone tried to get this working with Rails? I've included leaflet-ajax.js in the asset pipeline (vendor/assets/leaflet/leaflet-ajax.js) and the failure point is:
var L = global.L || require('leaflet');
Console output:
leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:1 Uncaught Error: Cannot find module 'leaflet'
at s (leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:1)
at leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:1
at Object.<anonymous> (leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:387)
at Object.4../ajax (leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:520)
at s (leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:1)
at e (leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:1)
at leaflet-ajax.self-926b03b1a13f4f48082577d5eec645d52c1001d3b6014e43024670c27c78ea7e.js?body=1:1
In this context, I'm not sure which "require" is being used. This article was somewhat helpful along these lines: Stackoverflow link. Is this distrib not designed to be run in a browser?
Is there a "module" for leaflet that needs to included somewhere? Any number of ways of referencing leaflet.js did not seem to work. (Passing urls etc.)
I'm sure there's some basic js ignorance on my part here, but I can't imagine I'm the only one to try this. Thanks for the help!
The text was updated successfully, but these errors were encountered:
Discussion: Rails
Has anyone tried to get this working with Rails? I've included leaflet-ajax.js in the asset pipeline (vendor/assets/leaflet/leaflet-ajax.js) and the failure point is:
Console output:
In this context, I'm not sure which "require" is being used. This article was somewhat helpful along these lines: Stackoverflow link. Is this distrib not designed to be run in a browser?
Is there a "module" for leaflet that needs to included somewhere? Any number of ways of referencing leaflet.js did not seem to work. (Passing urls etc.)
I'm sure there's some basic js ignorance on my part here, but I can't imagine I'm the only one to try this. Thanks for the help!
The text was updated successfully, but these errors were encountered: