Use this project to simulate GPS while doing development on your Windows Phone 7 emulator or device.
If you are developing an application that uses the GPS it is somewhat difficult to test this on the emulator since there is a lack of support for simulating the GPS. Even if you are doing development on the device, you may need to get a series of readings to
test your software. This project which includes a single C# file that you include in your project as well as a Silverlight Route Builder (on this page) can be used to simulate the GPS.
FakeGPS.cs and include it in your project.
- Use the route editor below to build a simulated route you wish to play back on the device
- Press "Copy to Clipboard"
- Paste the Route XML into FakeGPS.cs replacing the existing XML assigned to ROUTE constant in that file.
- Where you perviously declare GeoCoordinateWatcher in your applications code replace it with a declaration of IGeoPositionWatcher<GeoCoordinate>.
- Conditionally instantiate either GeoCordinateWatcher or a WolfBytes.FakeGPS instance.
- Use your GPS like you normally would.
_watcher = new WolfBytes.FakeGps();
_watcher = new GeoCoordinateWatcher();
- Total Run Time - The total time in seconds from the first way point to the last way point
- Update Interval - The number if milliseconds between updates between PositionChanged events from the GPS
- Pause Before Start - The number of milliseconds between invoking the start method on the FakeGPS and the first PositionChanged event.
- To add way points, click on the map.
- To remove a waypoint, click on that way point
- After you have built your route, click on Copy to Clipboard and paste those values into the existing ROUTE string constant within FakeGps.cs