Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6327935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:22:07+00:00 2026-05-24T17:22:07+00:00

I have code that is used to show a device’s location. It works just

  • 0

I have code that is used to show a device’s location. It works just fine on the emulator and it takes me to the fake location at Microsoft. But it didn’t work when I build it into the phone, it showed me the world map. Is this a known bug or I have done something wrong? Here is my code:

    private GeoCoordinateWatcher loc = null;

    private void button1_Click(object sender, RoutedEventArgs e)
    {
        if (loc == null)
        {
            loc = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);
            loc.StatusChanged += loc_StatusChanged;
        }
        if (loc.Status == GeoPositionStatus.Disabled)
        {
            loc.StatusChanged -= loc_StatusChanged;
            MessageBox.Show("Location services must be enabled on your phone.");
            return;
        }
        loc.Start();
    }

    void loc_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e)
    {

        if (e.Status == GeoPositionStatus.Ready)
        {
            Pushpin p = new Pushpin();
            p.Template = this.Resources["pinMyLoc"] as ControlTemplate;
            p.Location = loc.Position.Location;
            mapControl.Items.Add(p);
            map1.SetView(loc.Position.Location, 17.0);
            loc.Stop();
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:22:09+00:00Added an answer on May 24, 2026 at 5:22 pm

    This is due to my location doesn’t support by Bing Map. I couldn’t use the Bing Map app installed in my phone neither. Hmm…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code that is used to show the name of the
I have some legacy code that was used to monitor my applications cpu,memory etc
I have a code base that has been used as an ASP.Net web application.
I have a bunch of generic code that is used a lot, which i'd
I have a section of code that is being used to determine if a
I have this code inside a class that is used by an application and
Here is the piece of code that I have used for Java 5.0 TreeSet<Integer>
We have a project that generates a code snippet that can be used on
I have the following code in an Autofac Module that is used in my
I have a block of JSP code that needs to be used in several

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.