angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

3rd party leaflet plugin doesn't extend

Open ajainvivek opened this issue 10 years ago • 4 comments

OS?

Mac OSX (El Capitan)

Versions.

angular-cli: 1.0.0-beta.15 node: 6.5.0

Repro steps.

I have installed leaflet npm install leaflet --save npm install @types/leaflet --save-dev included in angular-cli.json under scripts

Importing leaflet works but I had to install leaflet plugin called esr-leaflet but unfortunately that doesn't work and never extends leaflet npm install esri-leaflet --save included in angular-cli.json under scripts

ajainvivek avatar Sep 29 '16 01:09 ajainvivek

Hi @ajainvivek,

i am facing the same problem with the plugin leaflet-editable. Did you solve your problem and if so, how did you do it?

Thanks in advance!

fabian-gehrs avatar Mar 03 '17 15:03 fabian-gehrs

@flumpt Had a similar issue with Leaflet draw plugin.

If you're adding the leaflet in the angular-cli.json, don't import it in the app code, use @types definition or declare const L: any to access the leaflet object where needed.

Solution for me was deleting all import * as L from 'leaflet' lines from my code. Importing Leaflet both in the code and the angular-cli.json creates a new, duplicate leaflet object that is not extended.

vkovacev avatar Mar 25 '17 10:03 vkovacev

@k-vladisalv Thank you for your reply. I will try that asap.

fabian-gehrs avatar Mar 25 '17 14:03 fabian-gehrs

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.