This repository was archived by the owner on Sep 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html ng-app ="demoapp ">
3+ < head >
4+ < script src ="../bower_components/angular/angular.min.js "> </ script >
5+ < script src ="../bower_components/leaflet-dist/leaflet.js "> </ script >
6+ < script src ="../dist/angular-leaflet-directive.min.js "> </ script >
7+ < link rel ="stylesheet " href ="../bower_components/leaflet-dist/leaflet.css " />
8+ < script >
9+ var app = angular . module ( "demoapp" , [ "leaflet-directive" ] ) ;
10+ app . controller ( "DemoController" , [ "$scope" , function ( $scope ) {
11+ angular . extend ( $scope , {
12+ london : {
13+ lat : 51.505 ,
14+ lng : - 0.09 ,
15+ zoom : 5
16+ } ,
17+ paths : {
18+ p1 : {
19+ color : '#000' ,
20+ weight : 8 ,
21+ latlngs : [
22+ { lat : 51.50 , lng : - 0.082 } ,
23+ { lat : 48.83 , lng : 2.37 } ,
24+ { lat : 41.91 , lng : 12.48 }
25+ ] ,
26+ }
27+ }
28+ } )
29+
30+ $scope . myPath = {
31+ p1 : {
32+ color : '#0ff' ,
33+ weight : 8 ,
34+ latlngs : [
35+ { lat : 48.83 , lng : 2.37 } ,
36+ { lat : 41.91 , lng : 12.48 }
37+ ] ,
38+ }
39+ }
40+
41+ } ] ) ;
42+ </ script >
43+ < style >
44+ .angular-leaflet-map {
45+ width : 640px ;
46+ height : 400px ;
47+ }
48+ </ style >
49+ </ head >
50+ < body ng-controller ="DemoController ">
51+ < leaflet center ="london " paths ="myPath "> </ leaflet >
52+ </ body >
53+ </ html >
You can’t perform that action at this time.
0 commit comments