0
난에 geting하고 내가 왜 해달라고 NG-지도
var app = angular.module('app', ['ngMap']);
app.controller('ctrl', ['$scope', 'ngMap','$timeout', function($scope, ngMap,$timeout) {
NgMap.getMap().then(function(map) {
var center = map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(center);
});
$timeout(function() {
NgMap.getMap().then(function(map) {
google.maps.event.trigger(map, 'resize');
});
}, 500);
}]);
#ng-map {
width: 100% !important;
height: 100% !important;
position: absolute !important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/scripts/ng-map.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="app" ng-controller="ctrl">
<div map-lazy-load="https://maps.google.com/maps/api/js" id="ng-map" map-lazy-load-params="https://maps.google.com/maps/api/js?key=AIzaSyB4qnR0XX1tetbLUxSSLVWKi_E4WzGi1tk">
<ng-map zoom="4">
</ng-map>
</div>
</div>
알고 NG 맵을 사용하고 화면의 절반 UI를에 geting하지만 전체 사업부에서 그것을에 geting하고 있지 않다 UI에서 부분적인지도를 표시 이 오류. 제발 도와주세요
도움 주셔서 감사합니다. CSS에 ** 중요! ** 추가시 오류가 수정되었습니다. –