Book Image

Windows Phone 7.5: Building Location-aware Applications

Book Image

Windows Phone 7.5: Building Location-aware Applications

Overview of this book

Windows Phone 7.5 has met with some great initial reviews from all mobile critics. It is poised to be the '3rd' eco-system for mobile, joining Apple's iOS and Google's Android platform. With Microsoft and Nokia working on multiple devices based on Windows Phone, the platform is a no-brainer enterprise success. Microsoft Office, Email, Skype and a fresh new mobile operating system has been a great champion of a cause for both Microsoft and Nokia. "Windows Phone 7.5: Building Location-aware Applications" will teach you to divein to the new Windows Phone Experience. No more 600 page bibles - just the right mix of text and lots of code to get you started!"Windows Phone 7.5: Building Location-aware Applications" covers location based services and maps, and focuses on methods of location detection and maps. Powered with this information, two real-world applications are covered. In short, this is a concise book on building location aware apps for Windows Phone.
Table of Contents (11 chapters)
Windows Phone 7.5: Building Location-aware Applications
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Custom map pushpins


We created our own maps application and added a pushpin. Great! But does it look great? To be honest — no, the black pushpin icon is not fancy. In fact the pushpins in the Location simulator are better! (We hope Microsoft guys are reading this line.) We can, however, use the following code to add some content to the pushpin, but it still does not give us the "wow" look:

myPin.Content = newLoc.Position.Location.Latitude.ToString() +
", " +newLoc.Position.Location.Longitude.ToString();

Thankfully the Windows Phone Bing Maps Silverlight Control provides the ability to use our own icons for the pushpin. There are two ways to use custom map pushpins:

  • Using an image as the pushpin

  • Using your own pushpin style (in XAML)

Note

The guys at http://365psd.com/ have some excellent and free map pushpin icons. You can find a few at http://365psd.com/?s=map. We use the one from Dennis Covent: http://365psd.com/day/2-302/ as the custom icon for our pushpin.

Using an image as the pushpin...