i using angular-google-maps 2.2.1
in my application and i have a list 'itemStatusData
' which have objects contain information of lat and lng . When i push first element of my list to marker my location get update perfectly but when the size of my list which contains lat lng related data increases and when i try to push only single element it gives me error:
RangeError: Maximum call stack size exceeded
at baseClone (lodash.js:1686)
at lodash.js:1734
at lodash.js:3073
at baseForOwn (lodash.js:2046)
at baseClone (lodash.js:1733)
at lodash.js:1734
at lodash.js:3073
at baseForOwn (lodash.js:2046)
at baseClone (lodash.js:1733)
at lodash.js:1734
i have following code which gets the list of lat lng data from server
$scope.play = function(){
$scope.carCurrentStatusData = [];
$q.when(Item.findItemGPSLocationHistory({itemid: itemid}).$promise, function(data){
$scope.itemStatusData = data;
});
}
ItemStatusData have objects of lat and lng
In my html i am using this code:
<ui-gmap-google-map center='map.center' zoom='map.zoom'>
<ui-gmap-marker ng-repeat="marker in markers" coords="marker.coords" options="marker.options" idkey="marker.id">
</ui-gmap-marker>
</ui-gmap-google-map>
code which fills marker data is
$scope.fillMarkerData = function(value, data){
$scope.map = { center: { latitude: data.lat, longitude: data.lng }, zoom: parseInt($scope.zoom) };
$scope.markers = [];
var marker = {
id: value,
coords: {
latitude: data.lat,
longitude: data.lng
}
};
$scope.markers.push(marker);
};
Here i also want to add that if my list which contains lat lng data increase above 1980 then it throws above error below this it is running fine. I do not know what is happening.
I also want to add one more clue that i have a watch expression. if i removed that watch expression then my code works fine otherwise it fails. If any one can help me then please help.