单张地图不加载有角传单指令

时间:2019-11-25 14:51:50

标签: angularjs leaflet angular-leaflet-directive

我直接从此网页上将源代码复制并粘贴到我的编译器上:http://tombatossals.github.io/angular-leaflet-directive/examples/0000-viewer.html#/basic/first-example

我在HTML文件中包含了以下源文件:

<script src="../bower_components/angular/angular.min.js"></script>
<script src="../bower_components/leaflet/dist/leaflet.js"></script>
<script src="../dist/angular-leaflet-directive.min.js"></script>
<link rel="stylesheet" href="../bower_components/leaflet/dist/leaflet.css" />

<script src="http://tombatossals.github.io/angular-leaflet-directive/bower_components/angular/angular.min.js"></script>
<script src="http://tombatossals.github.io/angular-leaflet-directive/bower_components/leaflet/dist/leaflet.js"></script>
<script src="http://tombatossals.github.io/angular-leaflet-directive/dist/angular-leaflet-directive.min.js"></script>
<link rel="stylesheet" href="https://angular-ui.github.io/ui-leaflet/bower_components/leaflet/dist/leaflet.css"/>

地图未加载,如下图所示: enter image description here

1 个答案:

答案 0 :(得分:0)

在使用angular-leaflet-directive之前,您必须在项目中包含一些文件(.css和.js)。

尝试遵循those steps