0
我已經使用了uiGmapGoogleMapApi NOT WORKING標記infowindow數組。你可以幫我嗎?沒有問題,但正在添加不工作Angularjs uiGmapGoogleApi信息窗口不工作?
<ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" options="options">
<ui-gmap-markers models="markers" idkey="markers.id" coords="'coords'" click="
onClick()" events="markers.events" >
<ui-gmap-window options="windowOptions" closeClick="closeClick()">
<div>{{title}}</div>
</ui-gmap-window>
</ui-gmap-markers>
</ui-gmap-google-map>
Script.file
angular.module('appMaps', ['uiGmapgoogle-maps'])
.controller('mainCtrl', function($scope, $log) {
$scope.map = {center: {latitude: 40.1451, longitude: -99.6680 }, zoom: 4 }
$scope.options = {scrollwheel: false};
$scope.markers = [{
coords: {
latitude: 40.1451,
longitude: -99.6680
},
id: 0
}
];
$scope.windowOptions = {
visible: false
};
$scope.onClick = function() {
$scope.windowOptions.visible = !$scope.windowOptions.visible;
};
$scope.closeClick = function() {
$scope.windowOptions.visible = false;
};
$scope.title = "Window Title!";
});
定義_ 「不工作」 _更精確地請。 – duncan