Lat and Lon in MapPinPoint

4 posts, 0 answers
  1. AngeIa AngeIa
    AngeIa AngeIa avatar
    15 posts
    Member since:
    Dec 2009

    Posted 31 Jan 2010 Link to this post

    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.
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 03 Feb 2010 Link to this post

    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.
  3. DevCraft banner
  4. AngeIa AngeIa
    AngeIa AngeIa avatar
    15 posts
    Member since:
    Dec 2009

    Posted 03 Feb 2010 Link to this post

    Thank you, very much. 
  5. AngeIa AngeIa
    AngeIa AngeIa avatar
    15 posts
    Member since:
    Dec 2009

    Posted 04 Feb 2010 Link to this post

    I understand!
Back to Top