AngularJS error : TypeError: Cannot read property 'toString' of undefined
<p>Im working on a project that involves AngularJS and I am running into an error cant seem to figure out. Needless to say, I am a newbie on this hopefully you guys could help me figure this out cause I 've spent quite sometime on this issue.</p>

<p>here is my code</p>

<p>WatchboxCtrl.js
<a href="https://gist.github.com/anonymous/0c68fbd87574d61377b54981a09f66e5" rel="nofollow">https://gist.github.com/anonymous/0c68fbd87574d61377b54981a09f66e5</a></p>

<p>and this is where the error occurs</p>

<p>FleetMapCtrl.js</p>

<p><a href="https://gist.github.com/anonymous/9df7bc7c54a09c91dd60cd009ba9ff91" rel="nofollow">https://gist.github.com/anonymous/9df7bc7c54a09c91dd60cd009ba9ff91</a></p>

<p>Ultimately, what i want to do is, having the app shows multiple alerts and if i click on one of the alert, the app should automatically zoom in onto the unit that the alert is originated. Previously, I have the "id" as string and it was working fine;however, I later on changed the "id" to integer and the zoom functionality no longer working. The console in gives me this error every time i click on the alert :</p>

<p><code>angular.js:11655 TypeError: Cannot read property 'toString' of undefined
    at flyTo (FleetMapCtrl.js:320)
    at Object.fn (FleetMapCtrl.js:287)
    at Scope.$digest (angular.js:14308)
    at Scope.$apply (angular.js:14571)
    at HTMLButtonElement.&lt;anonymous&gt; (angular.js:21571)
    at HTMLButtonElement.dispatch (jquery-2.0.3.min.js:5)
    at HTMLButtonElement.y.handle (jquery-2.0.3.min.js:5)</code></p>

<p>It showing the error at line 320 in fleetmapCtrl.js but I cant figure out/understand why it's not working. </p>

<p>Please help. I searched everywhere in order to fix it but I cant seem to get it resolved. Im desperate. Thanks</p>