I'm trying to run something similar to this example in stackblitz.
The code (not mine, but similar to what i'm trying to achieve) runs in js fiddle where you can include dependencies as url's from github but does not work when trying the same in stackblitz project.
I have tried to include dependencies in index.html like this:
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script>
<script src="https://kartena.github.io/Proj4Leaflet/lib/proj4-compressed.js"></script>
<script src="https://kartena.github.io/Proj4Leaflet/src/proj4leaflet.js"></script>
<script src="https://cdn.rawgit.com/MrMufflon/Leaflet.Coordinates/master/dist/Leaflet.Coordinates-0.1.5.min.js"></script>
I have also tried some of dynamic loading code snippets but I always end up with
L is not defined
Add the script tags in the page <head>
tag
<head>
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script>
<script src="https://kartena.github.io/Proj4Leaflet/lib/proj4-compressed.js"></script>
<script src="https://kartena.github.io/Proj4Leaflet/src/proj4leaflet.js"></script>
<script src="https://cdn.rawgit.com/MrMufflon/Leaflet.Coordinates/master/dist/Leaflet.Coordinates-0.1.5.min.js"></script>
</head>
<div id="app"></div>
<div id="map"></div>