http://plnkr.co/edit/Zd9GwG?p=preview구글 맵 업데이트 각도 업데이트
Google지도 + angular.js 예제에서 작업 중입니다. 위치 센터를 변수에 따라 동적으로 변경하려고합니다 .i.e. 나는 그것을 역동적 인 중심으로 만들고 싶다. 이 방법을 제안하십시오.
나는이 일을하고 싶다.
// 코드는지도를 갱신하기 위해 범위의 변화를 볼 필요 여기
//Add the requried module 'angular-ui' as a dependency
angular.module('maptesting', ['ui.directives']);
function MapCtrl($scope) {
$scope.lat = 35.120922 ;
$scope.long = -89.97731 ;
var ll = new google.maps.LatLng($scope.lat, $scope.long);
$scope.mapOptions = {
center: ll,
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
//Markers should be added after map is loaded
$scope.onMapIdle = function() {
//alert("DF");
if ($scope.myMarkers === undefined){
var marker = new google.maps.Marker({
map: $scope.myMap,
position: ll
});
$scope.myMarkers = [marker, ];
}
};
$scope.showMarkerInfo = function(marker) {
$scope.myInfoWindow.open($scope.myMap, marker);
};
$scope.changeval = function(){
$scope.lat = 13.0810 ;
$scope.long = 80.2740 ;
};
}
동적 무엇을해야 ? 지도의 중심? 마커? 자세한 내용은 제발. – Alp
왜 폐쇄 되었습니까? 나는 그 질문을 편집했다. 나는 대답을 각하 –