@andywww wrote:
I’m having some problems with mixing
app.import
andimport X from 'Y'
I am using ember-leaflet with the usual
import { L } from 'ember-leaflet';
but would also like to include this plug-in which I am pulling in from /vendor in ember-cli-build.js withapp.import('vendor/leaflet.awesome-markers.js');
However, when I come to use it:
import Controller from '@ember/controller'; import { L } from 'ember-leaflet'; export default Controller.extend({ lng: -1.871569, lat: 53.802310, zoom: 10, tripIcon: L.AwesomeMarkers.icon({icon: 'flag-checkered', markerColor: 'red', prefix: 'fa'}), rideIcon: L.AwesomeMarkers.icon({icon: 'flag-checkered', markerColor: 'blue', prefix: 'fa'}), waypointIcon: L.AwesomeMarkers.icon({icon: 'flag-checkered', markerColor: 'green', prefix: 'fa'}) });
It doesn’t seem to recognise
AwesomeMarkers
as an object onL
, I’m assuming because theL
it is using is the one that comes in from ember-leaflet and leaflet.awesome-markers is trying to attach to a globalL
?Please see below console output.
Any help to understand this would be appreciated.
Posts: 2
Participants: 1