Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Windows Phone 7.5: Building Location-aware Applications

You're reading from  Windows Phone 7.5: Building Location-aware Applications

Product type Book
Published in Jul 2012
Publisher Packt
ISBN-13 9781849687249
Pages 148 pages
Edition 1st Edition
Languages

Table of Contents (11) Chapters

Windows Phone 7.5: Building Location-aware Applications
Credits
About the Author
About the Reviewers
1. www.PacktPub.com
2. Preface
1. The Location-based World 2. Using Location in Windows Phone 7.5 3. Using Maps in your Windows Phone App 4. Events App - PacktEvents 5. Location-aware News App — PacktNews

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}