user1673057
user1673057

Reputation: 37

Get the longitude and latitude by providing the locality address in windows phone 7

I want to get the geolocation by providing the locality address in windows phone app development.??//

Upvotes: 0

Views: 122

Answers (2)

Sonu
Sonu

Reputation: 132

  1. First Of all take a text block to save and see Coordinates .
  2. Now Name It as txtBlock1 .

Now you can add the following Code in Map Hold event .

The point where you hold the mouse . it will show you the coordinates both longitude and lattitude.

And you can use them as a string or as a location wise any where

mapMain.Hold += (s, e) =>

                {
                    Point p = e.GetPosition(this.mapMain);

                    GeoCoordinate geo = new GeoCoordinate();

                    geo = mapMain.ViewportPointToLocation(p);

                    txtBlock1.text = geo.ToString();


                };

Hope It helps... :-)

Upvotes: 1

Claus Jørgensen
Claus Jørgensen

Reputation: 26355

Use the Bing Maps Geocode Service

Upvotes: 1

Related Questions