ngmap
Version:
The Simplest AngularJS Google Maps V3 Directive
19 lines (17 loc) • 527 B
HTML
<html ng-app="ngMap">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script src="script-tags-for-development.js"></script>
<script>
angular.module('ngMap').controller('MyCtrl', function() {
this.lat = 40.74, this.lng = -74.18;
});
</script>
</head>
<body ng-controller="MyCtrl as vm">
<ng-map center="[{{vm.lat}}, {{vm.lng}}]"></ng-map>
<br/>Latigude : <input type="number" ng-model="vm.lat" />
<br/>Longitude : <input type="number" ng-model="vm.lng" />
</body>
</html>