I have been using esri's LocateButton on a map for almost a year now and it works well. I'm now trying to enable the Tracking option to create a moving map for staff and I can't seem to get it working properly. This example works for me and is what i'm looking to achieve. Essentially I have the option enabled and it does continue to centre the map as expected. The problem comes when I try to turn the function off. With the clearOnTrackStop set to true the dot is removed and if I check the properties I can see that Tracking is set to off but my GPS dot reappears as soon as a new location is found.
Why? It's almost as if there's another function running somewhere that triggers the locate to renable but I can't find it.
I have stripped down version of my map running here if you'd care to look at my code.