locked
country code returned by geolocator class varies from PC to PC, but all PCs are at same location.

    Question

  • Hi Everyone,

    we are developing one location based app for win8 and wp8. to get the location (only country code) ,we are using geolocator class as shown below. but, the problem here is the country codes returned by geolocator are varying from pc to pc, though all pcs are at one location.

    this leads to the major problems in our application.

    how geolocator class gets the location of our pc? what is the root cause for this problem?

    can anybody please help me to figure out this issue?

     Geolocator geo = new Geolocator();
                                CancellationTokenSource cts = new CancellationTokenSource();
                                CancellationToken token = cts.Token;
                                Geoposition pos = await geo.GetGeopositionAsync();
                                countrycode= pos.CivicAddress.Country.ToString().ToLower()



    Friday, February 13, 2015 5:26 AM

All replies

  • What devices/hardware are you using?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, February 13, 2015 7:20 PM
    Moderator
  • we are using local machine for win8 app and emulator for wp8.

    my location machine details are:

    make:lenovo

    machine model:p27

    processor: intel core i5

    please feel free to ask further information if needed.

    Tuesday, February 17, 2015 8:44 AM
  • What I meant was: what are all of the devices that you are using?  Knowing only one doesn't give any insight into the differences.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, February 25, 2015 6:04 PM
    Moderator