Loading KML File

3 posts, 1 answers
  1. Michael Semanson
    Michael Semanson avatar
    11 posts
    Member since:
    Mar 2010

    Posted 15 Mar 2010 Link to this post

    I must be missing something because this would seem to be a pretty basic feature for the Map control.

    How do you load a KML file and display it on the map control?

    The demo that imports the European KML file uses the following statement:
                // loading the eu.kml file 
                StreamResourceInfo streamInfo = Application.GetResourceStream( 
                    new Uri("/Examples.Map;component/Resources/eu.kml", UriKind.RelativeOrAbsolute)); 

    But I'm not familiar with URI syntax and I can't tell what the statement is doing, or more specifically, what the values within the quotes represent.

    What is Examples.Map?  Is that a namespace or another external file?  

    And where is eu.kml located as referenced above?  Is it in a subdirectory of the project called component\Resources?

  2. Answer
    Ves avatar
    2869 posts

    Posted 17 Mar 2010 Link to this post

    Hello Michael,

    Examples.Map is the name of the assembly and the part after "component/" i.e. "Resources/eu.kml" is the path where the resource is located. That is -- the eu.kml file is located in "Resources" folder in the map examples project. The name of the project is either Map.CS or Map.VB, usually found in C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2010\Demos\Map folder.

    You can find more details about loading resource files in Silverlight in this article.

    Best regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
  4. Michael Semanson
    Michael Semanson avatar
    11 posts
    Member since:
    Mar 2010

    Posted 18 Mar 2010 Link to this post

    Thanks.  I'm new to Telerik and didn't realize the demo projects were installed with the development tools.
Back to Top