RadMap KML Support. What is and isnt supported ?

2 posts, 0 answers
  1. Ian
    Ian avatar
    23 posts
    Member since:
    Jun 2011

    Posted 13 Mar 2012 Link to this post

    Hi telerik.

    So i have currently been given the task of letting users import lots of different kml into our radmap control,  and i am finding very mixed results, alot of them give errors.

    I found an old post stating that only the following are currently supported
    Currently the map control supports the following KML elements:
     1. Point
     2. LineString
     3. Polygon (including outerBoundaryIs and innerBoundaryIs)
     4. Styles: IconStyle (including hotspot), LineStyle, PolyStyle
     5. BalloonStyle
     6. ExtendedData
     7. Partial support for MultiGeometry tag.

    Is this still true for today (using 2012 release). and is there a nice easy way to determine when im reading the kml if something is supported or not and show an error ?

     

    if (dialog.File.Extension == ".kmz")

    {

     

    ZipFile zipFile = new ZipFile(dialog.File.OpenRead());

     

    List<FrameworkElement> list = KmlReader.Read(zipFile.GetInputStream(0));

     

    foreach (FrameworkElement element in list)

    {

     

    this.wmllayer.Items.Add(element);

    }

     

    this.wmllayer.Visibility = Visibility.Visible;

    }

     

    else

    {

     

    // Open the selected file to read.

    System.IO.

     

    Stream fileStream = dialog.File.OpenRead();

     

    List<FrameworkElement> list = KmlReader.Read(fileStream);

     

    foreach (FrameworkElement element in list)

    {

     

    this.wmllayer.Items.Add(element);

    }

     

    this.wmllayer.Visibility = Visibility.Visible;

    }


    Any help would be greatly appreciated
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 15 Mar 2012 Link to this post

    Hello Ian,

    Yes, it is true for the 2012.Q1 version. The list of the supported KML elements have not been changed. Unfortunately there is no way to detect unsupported KML elements in the current version of the RadMap control. We are planning to change it in the future. You can check when this feature will be available using our PITS:

    http://www.telerik.com/support/pits.aspx#/public/silverlight/10203

    Regards,
    Andrey Murzov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
Back to Top