Created
January 21, 2016 19:52
-
-
Save rishiloyola/fcc9936db2e60823abd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dragProcess(response) { | |
if (response.hits) { | |
for (var i = 0; i < response.hits.hits.length; i++) { | |
if (response.hits.hits[i]._source) { | |
if (response.hits.hits[i]._source.latitude && response.hits.hits[i]._source.longitude) { | |
if (citysearched == response.hits.hits[i]._source.city) | |
continue; | |
var default_arr = helper.getMapArray(response.hits.hits[i]._source); | |
var specific_arr = [ | |
'src/assets/img/yellow_marker.png' | |
]; | |
var arr = default_arr.concat(specific_arr); | |
draggedCheckin.push(arr); | |
} | |
} | |
} | |
} | |
if (draggedCheckin.length != 0) { | |
renderarray = []; | |
if (places != null) | |
renderarray.push.apply(renderarray, places); | |
renderarray.push.apply(renderarray, draggedCheckin); | |
if (streamedCheckin != null) | |
renderarray.push.apply(renderarray, streamedCheckin); | |
$scope.places = renderarray; | |
$scope.$digest(); | |
$scope.$apply(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment