-
Notifications
You must be signed in to change notification settings - Fork 632
/
Copy path0101-basic-lf-center-example.html
37 lines (37 loc) · 1.41 KB
/
0101-basic-lf-center-example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html ng-app="demoapp">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../bower_components/angular/angular.min.js"></script>
<script src="../bower_components/leaflet/dist/leaflet.js"></script><script src="../bower_components/angular-simple-logger/dist/index.js"></script>
<script src="../dist/angular-leaflet-directive_dev_mapped.js"></script>
<link rel="stylesheet" href="../bower_components/leaflet/dist/leaflet.css" />
<script>
var app = angular.module('demoapp', ['leaflet-directive']);
app.controller('BasicCenterController', [ '$scope', function($scope) {
angular.extend($scope, {
london: {
lat: 51.505,
lng: -0.09,
zoom: 4
}
});
}]);
</script>
<style>
input {
width: 120px;
margin-right: 10px;
}
</style>
</head>
<body ng-controller="BasicCenterController">
<leaflet lf-center="london" width="100%" height="480px"></leaflet>
<h1>Center map example</h1>
<ul>
<li><input type="number" step="any" ng-model="london.lat" /> Latitude</li>
<li><input type="number" step="any" ng-model="london.lng" /> Longitude</li>
<li><input type="number" step="any" ng-model="london.zoom" /> Zoom</li>
</ul>
</body>
</html>