使用$ http设置多个离子标记

I had succeed make an array from json. My problem is looping in showing marker. Please answer if you know about this. Thanks

.controller('MapCtrl', function($scope, $http, $state, Markers, $cordovaGeolocation) {
console.log(Markers.getMarkers(
));
var options = {timeout: 10000, enableHighAccuracy: true};

$cordovaGeolocation.getCurrentPosition(options).then(function(position){

var latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var pospolinela = new google.maps.LatLng(-5.357945, 105.232839);
var mapOptions = {
  center: pospolinela,
  zoom: 15,
  mapTypeId: google.maps.MapTypeId.ROADMAP
};

$scope.map = new google.maps.Map(document.getElementById("map"), mapOptions);
//Wait until the map is loaded
google.maps.event.addListenerOnce($scope.map, 'idle', function(){
  Markers.getMarkers().then(function(markers){
    var records = markers.data.result;
    for(var i = 0; i< records.length; i++){
    var record = records[i];
    var markerPos = new google.maps.LatLng(record.latitude, record.longitude);
    var marker = new google.maps.Marker({
        map: $scope.map,
        position: markerPos
    });
    }
  })

});
}, 

What exactly do you mean here? I suspect that the map show one marker pin and not all?Also you use a service right?