mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
* Added NgMap definitions * Removed MarkerLabel from label * Fixed url to DefinitelyTyped repository * Changed module to namespace. * Reflect changes also to ng-map-tests. * Renamed folders, files and module for naming conventions * Changed reference path in tests to reflect recent naming changes.
25 lines
749 B
TypeScript
25 lines
749 B
TypeScript
/// <reference path="ngmap.d.ts" />
|
|
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)]); |