none
WP7 - GetCurrentLatitudeLongitude()

    Question

  • Hi,

    I am building a Bing map, WP7 Phone App, my first venture into the Phone world, tool for the mariner.  In doing my research I am unable to locate anything related to Lat & Long = GetCurrentPosition().  There are lots of examples where the Lat & Lon is displayed AFTER a street address has been entered.  My scinerio is one were the user doen't know where they are.  I need to place a pin in the center of the screen based upon the phones current GPS position (lat & Long).

    If anyone has any thoughts or suggestions of where to start looking... thanks

    Thanks
    Phill


    SquireDude

    Friday, April 20, 2012 5:58 PM

Answers

All replies

  • Friday, April 20, 2012 6:42 PM
  • Sunday, April 22, 2012 9:17 AM
  • Hi,

    I am perplexed... I have been using the GeoPositionChanged object to get my current location... BUT it seems that the only position it will retrieve is Microsoft  NOT my current position!

    I have been using teh same code that I have found in 3 examples from Microsoft...

                textBox1.Text = "Latitude is " + e.Position.Location.Latitude.ToString("0.0000") + "\n";
                textBox1.Text += "Longitude is " + e.Position.Location.Longitude.ToString("0.0000") + "\n";

    I read an articel that tells me that the Bing Map object can NOT give lat & long data and that it has to be coded in the HTML5 using the navigator.geolocation.getCurrentPosition(locationHandler); object

    Can anyone tell me if I am totally backwards with the whole thing?

    With the e.Position.Location Lat & Long I get the same location every time... 47.6448 x -122.1412... in reality I am at 34.2783352 x -119.2931676 (Ventura, Ca.)

    I have registered and got my credential and add them and not the message has disapeared.

    Thanks

    Phill


    SquireDude

    Sunday, April 22, 2012 8:11 PM
  • If you are running this locally in the development environment it will always grab Microsoft as the location unless you have a location sensor installed on your computer.

    http://rbrundritt.wordpress.com

    Monday, May 14, 2012 9:49 AM