Hi all, I'm building a web app that will track things like running, cycling and walking. To do so I'm using the the GeoLocation function watchPosition. This works fine but in order to regularly test it I need it to give me a few results without me having to physically go out and simulate a change in position.
What I mean is, the function calls another function, lets call it newPosition, when I move, but as I'm indoors, I would have to go outside to simulate movement, which isn't ideal while I'm building.
Is there any function to simulate a change in location? All I can think of currently, is to set a JS timer for every x seconds, and have it run newPosition, manually inserting the resulting object of getPosition, which will work fine (I hope), but makes it feel like the final version will be slightly different.
Hope this makes sense![Stick Out Tongue :p :p](/styles/default/xenforo/vbSmilies/Normal/tongue.gif)
What I mean is, the function calls another function, lets call it newPosition, when I move, but as I'm indoors, I would have to go outside to simulate movement, which isn't ideal while I'm building.
Is there any function to simulate a change in location? All I can think of currently, is to set a JS timer for every x seconds, and have it run newPosition, manually inserting the resulting object of getPosition, which will work fine (I hope), but makes it feel like the final version will be slightly different.
Hope this makes sense
![Stick Out Tongue :p :p](/styles/default/xenforo/vbSmilies/Normal/tongue.gif)