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

Loading KML File

2 Answers 76 Views
Map
This is a migrated thread and some comments may be shown as answers.
Michael Semanson
Top achievements
Rank 1
Michael Semanson asked on 15 Mar 2010, 04:03 PM
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?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 17 Mar 2010, 01:30 PM
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,
Ves
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.
0
Michael Semanson
Top achievements
Rank 1
answered on 18 Mar 2010, 12:50 PM
Thanks.  I'm new to Telerik and didn't realize the demo projects were installed with the development tools.
Tags
Map
Asked by
Michael Semanson
Top achievements
Rank 1
Answers by
Ves
Telerik team
Michael Semanson
Top achievements
Rank 1
Share this question
or