I'm working with google map & angularJS, i want to excecute the distance between current location and another location in JSON file. But the distance only show when I have a button in view template, that call a function in angular JS via ng-click: 

```
<button id="show-distance" ng-click="showDistance()">Show Distance</button>

```

in AngularJS file:

```
$scope.showDistance = function(){
    jQuery.each($scope.items, function (index, value) {
        $scope.distance = $scope.getDistance(jQuery.cookie('currentLat'), jQuery.cookie('currentLng'), value['latitude'], value['longitude']);
        value['location'] = $scope.distance;
    });
}

```

I show the distance in this way:

```
<table style="border: 1px solid" class="data-table">
    <tr>
        <th><?php echo $this->__('Store name')?></th>
        <th><?php echo $this->__('Address')?></th>
        <th><?php echo $this->__('Distance')?></th>
    </tr>
    <tr ng-repeat="item in items | filter:query | orderBy:orderProp | limitTo:quantity " ng-controller="ItemController" class="list-locator">
        <td ng-click="open(item)">{{item.title}}</span></td>
        <td ng-click="open(item)">{{item.address}}</td>
        <td ng-click="open(item)">{{item.location}} miles</td>
    </tr>
</table>

```

What can I do to show the distance without clicking anything ?