Cookie Notice

Wednesday 26 February 2014

Companions are great idea! Mapping for WP and W8.1

In many instances I have just made a copy of a Windows Phone App in Windows 8.  Of course, using the appropriate UI changes to conform to design requirements in Windows 8 but essentially the same program.  I encountered a case where this was not appropriate.

I have a program called Track My Trip (http://t.co/tlfN9CngAN) for Windows Phone that uses Nokia's HERE Maps and the device's GPS to create re-playable tracks.  You can upload the tracks or view them on your phone and see where you went and how fast you went there.  I was looking for an idea for a Windows 8.1 app and had already converted most of my games to the platform (games are relatively easy to port) but could think of any reason to convert Track My Trip to Windows 8.1.  Nobody is going to carry around a Microsoft Surface tablet to create a GPS track.  Most tablets don't even have a GPS device inside them, they just use WiFi to do their thing.  Also, HERE Maps is not yet available on most Windows 8.1 devices (It is available on the Nokia 2520 and is rumored to be coming to all Windows 8.1 devices).

Then the light came on.  What about a companion app?  It's not a duplicate of the WP app but a completely new app that enhances the original WP app.  In this case, I have had requests from a few users to be able to play back the track on a Windows Device.  You can use some web sites that will play the standardized ".gpx" files but how about a modern UI app.  Track My Trip Player (http://t.co/EkYvKDtMHY) was born.  How about an app that can open tracks (automatically) saved to SkyDrive by the Windows Phone app?  Bing Maps on the Windows 8.1 platform is more than adequate.  It even lets the user switch modes from a road map to a bird's eye view easily along with the usual stuff you would expect like zoom.

To add to the value of the new W8.1 app I added a running time tracker referencing the time the original track was created along with an elevation.  I was able to re-use much of my original code from the Windows Phone app for playback.  I had to change a few things because the Map API's are a bit different. 
  • Change "GeoCoordinate" to "Location":  Location does not have the concept of elevation, so you need to demonstrate this in a different way.  I used an Elevation tile but I think a running graph in the future might be more fun.
  • Change "MapLayer" to "MapShapeLayer" when creating the overlay of images you want on your map.  In my case, I needed to draw a line on the map.  The line would consist of a MapShapeLayer containing MapPolyLine(s) which are the same for both HERE and Bing.
Other than those two items everything was pretty consistent and once I got over the differences development went pretty smoothly.

Remember your Windows 8.1 design best practices and that it's NOT a Windows Phone App.  Remember to cross-promote your two fabulous apps to create demand for both.

Admire your handwork!

No comments:

Post a Comment