This is a migrated thread and some comments may be shown as answers.

Lat and Lon in MapPinPoint

3 Answers 115 Views
Map
This is a migrated thread and some comments may be shown as answers.
AngeIa AngeIa
Top achievements
Rank 1
AngeIa AngeIa asked on 31 Jan 2010, 11:21 AM
Hi.
My code:
avtostops = KmlReader.Read(streamInfo.Stream); 
...... 
foreach (FrameworkElement point in avtostops) 
            { 
                MapPinPoint pp = point as MapPinPoint; 
                .......... 
            } 
How can I find Latitude and Longitude of pp in code?
Thank you.

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 03 Feb 2010, 09:42 AM
Hello AngeIa,

You can get the attached Location property using the MapLayer class. The sample code is below.
avtostops = KmlReader.Read(streamInfo.Stream);  
......  
foreach (FrameworkElement point in avtostops)  
{  
    MapPinPoint pp = point as MapPinPoint;
    Location location = MapLayer.GetLocation(pp);
    ..........  
}  

The location object will contain Latitude and Longitude properties you need.

Regards,
Andrey Murzov
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
AngeIa AngeIa
Top achievements
Rank 1
answered on 03 Feb 2010, 12:24 PM
Thank you, very much. 
0
AngeIa AngeIa
Top achievements
Rank 1
answered on 04 Feb 2010, 12:25 PM
I understand!
Tags
Map
Asked by
AngeIa AngeIa
Top achievements
Rank 1
Answers by
Andrey
Telerik team
AngeIa AngeIa
Top achievements
Rank 1
Share this question
or