Skip to content

Instantly share code, notes, and snippets.

@rishiloyola
Created January 21, 2016 19:52
Show Gist options
  • Save rishiloyola/fcc9936db2e60823abd5 to your computer and use it in GitHub Desktop.
Save rishiloyola/fcc9936db2e60823abd5 to your computer and use it in GitHub Desktop.
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