meteor-mapbox
meteor-mapbox copied to clipboard
Mapbox GL directions plugin not working
I am trying to load Mapbox GL with directions plugin support as shown below, yet I am always getting following errors. Also code I am using shown below. Thanks
TypeError: mapboxgl.Directions is not a function
at app.js:113
at Tracker.Computation._compute (tracker.js:331)
at Tracker.Computation._recompute (tracker.js:350)
at Object.Tracker._runFlush (tracker.js:489)
at onGlobalMessage (setimmediate.js:102)
Uncaught ReferenceError: L is not defined index.js:3
Line 112 in app.js contains
map.addControl(new mapboxgl.Directions());
Meteor.startup(function() {
Mapbox.debug = true;
Mapbox.load({
gl: true,
plugins: ['directions']
});
});
Update: Removing version constrain from the pauloborges:mapbox as shown below removed the Uncaught ReferenceError error, yet I still get
TypeError: mapboxgl.Directions is not a function
on the line
map.addControl(new mapboxgl.Directions());
any thoughts? Thanks
Removing version constraint:
Was using pauloborges:[email protected]_2
now
pauloborges:mapbox