我正在使用这个项目(http://angular-google-maps.org/#!/)来处理AngularJS。我的代码似乎是:
app.js
function ( $scope, markerService ) {
var markerCollection = [];
angular.extend($scope, {
map: {
control: {},
center: {
latitude: 33.5,
longitude: -112
},
zoom: 10,
fit: true,
visible: true,
pan: true,
options: {
navigationControl: true,
scaleControl: true
}
}
});
var setMapMarkers = function (){
var markers = {};
var index = 0;
angular.forEach($scope.services, function (key) {
var service = key.address;
markerCollection.push(service);
var serviceId = service.service.id;
markers[index] = {
"latitude": parseFloat(service.latitude),
"longitude": parseFloat(service.longitude)
};
index++;
});
$scope.markers = markers;
};
setMapMarkers();
}
我在Safari中遇到这种行为并且非常奇怪。
https://www.dropbox.com/s/r7iwlr9mnboem1d/MapGrab.mov?dl=0
有人可能知道会出现什么问题?