mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
710 B
TypeScript
24 lines
710 B
TypeScript
class NgMapTestController {
|
|
constructor(public $scope: ng.IScope, public $window: ng.IWindowService, public NgMap: angular.map.INgMap) {
|
|
this.showMap();
|
|
}
|
|
|
|
public showMap() {
|
|
this.NgMap.getMap().then(function(map) {
|
|
console.log(map.getCenter());
|
|
});
|
|
}
|
|
}
|
|
|
|
var app = angular.module('angularLocalStorageTests', ['ngMap']);
|
|
|
|
app.config(function(NgMapProvider: angular.map.INgMapProvider) {
|
|
NgMapProvider.setDefaultOptions({
|
|
marker: {
|
|
optimized: false
|
|
}
|
|
});
|
|
});
|
|
|
|
app.controller('testCtrl', ['$scope', '$window', 'ngMap',
|
|
($scope: ng.IScope, $window: ng.IWindowService, NgMap: angular.map.INgMap) => new NgMapTestController($scope, $window, NgMap)]); |