Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Microsoft Virtual Academy content

This video is part of a free online course from Microsoft Virtual Academy, click here to view the full course and take advantage of many additional features such as assessments, slides, learning plans and more.

Building Apps for Windows Phone 8.1: (12) Maps, Geolocation, and Geofencing

38 minutes, 41 seconds


Right click “Save as…”

Find out about programming apps that use mapping and the users' locations.

Full course outline:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • Great information!  It would be better if the convergence was closer but still a nice step forward.


    Where is the sample code, please?



  • All sample code for these projects is located here.

    Look for the file labeled "Session 12 Demos"

  • Still going through the excellent videos you guys have done and having the code makes it so much easier to follow along.


    Thanks for a great work!

  • Rich CRich C

    You didn't mention (and can't find any mention of it anywhere) on how to enter in a street address and get a Geolocation back that can be used to calculate distance from another Geolocation or current location. Is this possible? If so, can you point me in the right direction?

  • Ricky Brundrittrbrundritt Give the time and resources, we can accomplish anything!

    Why not add the code samples to the MSDN Code Sample Gallery?

    Rich C - You can get the coordinates for a location using the maps services: http://msdn.microsoft.com/en-us/library/windowsphone/develop/dn631249.aspx From there you can then either use the map services to calculate the driving directions to get the driving distance between the locations. Alternatively you can use the Haversine formula to calculate the straight line distance (as the bird flies) between the locations. If you don't want to use the Map Services you can also use the Bing Maps REST services to do all this. The benefit of this approach is that you can use the Bing Maps REST services in universal apps.

  • So here's something interesting.

    I'm using exactly the same control as you, I have built a sample that puts icons on the map.

    In your sample, the icon overrides the labels on the map.  In mine, the labels override the icons, causing them to disappear seemingly randomly, but they are really getting overwritten by labels on the map.

    I've tried different Zindex's as high at 11 with no success.  (your Windows Phone map icon is set to 5).

    My sample uses a hub control and looks up the map control at runtime via its "Loaded" event handler, but other than that, I don't see a difference.

    I'll also report this in the forums, but haven't seen anyone else with this problem, so I thought I'd just remark here since you have a sample that works and is for WP 8.1


  • PontusPontus

    When will we be able to track location continuously in the background again? I want trigger events based on the users location, but since fencing in background only triggers every 2 minutes I cant use it... I really need to trigger more often then that!

  • samosansamosan

    I've got the same problem as Wp7dev007.
    So i suppose this is a bug ?

    i've got like 1300 mapicons to show and they are getting overwritten by labels on the map.

    Is there a way to fix that ?

    Thank you for your advice

  • Faisal JamilFaisal Jamil

    How can i find my geo point Latitude and longitude ?
    I try but i always show 47.6785619 as my latitude and -122.1311156 as my longitude.But in actual my latitude and longitude is 33.7167° N, 73.0667° E .

  • @Faisal Jamil: The details of your lat/long make it sound like you are running it inside the emulator instead of on the device. If you open up the emulator options, you should be able to change the emulated lat/long using the map control that is a part of the emulator tools. 

  • Peter KulcsarPeter Kulcsar

    I created several pushpin as xaml controls on the map.
    The problem is they easily overlay eachother if it zoomed out - and I prefer to handle if they overlay or just too close to eachother in the Viewport.

    At MapIcons this issue is handled automatically, but not at xaml controls.
    I am pretty sure there must be an event or an easy way that could handle this problem.

    Many thanks if somebody could help!

  • @Rich C - 25:25 talks about how to get a postal address for a location and vice versa.

  • @Rich C: at 0:25:25, he talks about how to get a postal address for a location and vice versa.

  • SebastienSebastien

    I need to be able to quickly draw 2000-3000 icons (no interaction needed) on the map. Looking at MapIcon, it looks the most suitable and efficient solution.
    However it looks like the interface is performant for a set less than 500 elements added to MapElements.
    Any plan to prepare a collection of MapIcon and set it in one shot to the MapElements collection (also enhancing the speed of display).


  • SebastienSebastien

    Well, I found a nice way to go through thousands of MapIcon. It is as simple as managing it programatically. I created a MapControl in the code, then added all my MapIcon (5000).
    When the user selects to see the map, I simply add the pre-created map object as a UIElement to the grid's children. And it renders in one shot.

  • ssddssdd

    I use vs.net 2013 and cant get here drive or any other driving application to run! how do you have here drive running on your emulator?

  • Great work guys really helpful!

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.