angular.module('drApp', ['ng', 'ngRoute', 'ngAnimate'])
.controller('startCtrl', ['$scope',function ($scope) {
var map = new AMap.Map('container');
map.setZoom(16);
map.setCenter([116.397428, 39.90923]);
var marker = new AMap.Marker({
position: [116.397428, 39.90923],
map: map
});
}]);
Error message: Uncaught ReferenceError: map is not defined
The map printed by the console:
Error purchasing source:
给我你的怀抱2017-05-15 16:59:54
var map = new AMap.Map('container');
Put this map console out and take a look