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

EXTERNAL FEEDS (GEORSS, KMZ)

5 Answers 65 Views
Map
This is a migrated thread and some comments may be shown as answers.
MarieQB
Top achievements
Rank 1
MarieQB asked on 21 Jul 2010, 06:03 PM
I am wondering if I could create a information layer which dynamically feeds information from external source such as the eartthquake from USGS.GOV web site, i.e. http://earthquake.usgs.gov/eqcenter/catalogs/eqs7day-age_src.kmz

If so, could you send me a sample code?

 

5 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 22 Jul 2010, 08:21 AM
Hi MarieQB,

Yes, you can use external source. You can load a file from internet using the WebClient class. The map control does not support kmz files directly, but you can use the following link to download the sharpziplib library:
http://slsharpziplib.codeplex.com/

The sample code of loading kmz file is below.

private void LoadKML(object sender, RoutedEventArgs e)
{
    WebClient client = new WebClient();
    client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
    client.OpenReadAsync(new Uri("http://earthquake.usgs.gov/eqcenter/catalogs/eqs7day-age_src.kmz"));
}

private
void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
    ZipFile zipFile = new ZipFile(e.Result);

    
List<FrameworkElement> list = KmlReader.Read(zipFile.GetInputStream(0));
    foreach (FrameworkElement element in list)
    {
        this.informationLayer.Items.Add(element);
    }
}


Best wishes,
Andrey Murzov
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
Top achievements
Rank 1
answered on 10 Mar 2011, 10:52 AM
Do you have support for displaying GeoRSS feeds?  If so, please throw a quick code sample (or link to one).

--Michael
0
Andrey
Telerik team
answered on 15 Mar 2011, 10:11 AM
Hi Michael,

Presently, the map control has not the feature you requested. Also currently it is not in our plans. I will make sure it is reconsidered when discussing our future plans, but I am afraid no certain time frame can be given at the moment.

All the best,
Andrey Murzov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
shawn
Top achievements
Rank 1
answered on 22 Mar 2011, 06:41 AM
Audrey,

I am getting started with the silverlight map.  Do you have a starter project I can use that is similar to your demo layout and theme?

0
Andrey
Telerik team
answered on 24 Mar 2011, 11:18 AM
Hello shawn,

The QSF is very complex application. I wouldn't recommend to use it as a starter project. The simple XAML code which uses the map control are below.
<UserControl x:Class="RadMapStarter.MainPage"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadMap x:Name="radMap"
                        Center="40,-100"
                        ZoomLevel="4">
            <telerik:RadMap.Provider>
                <telerik:OpenStreetMapProvider />
            </telerik:RadMap.Provider>
        </telerik:RadMap>
    </Grid>
</UserControl>

I have attached a sample solution. Just update the references to the three following DLLs:
- Telerik.Windows.Controls.dll
- Telerik.Windows.Controls.DataVisualization.dll
- Telerik.Windows.Data.dll

Also for more information I would recommend to take a look to the following help topic:
http://www.telerik.com/help/silverlight/radmap-getting-started.html


Best wishes,
Andrey Murzov
the Telerik team
Tags
Map
Asked by
MarieQB
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Michael
Top achievements
Rank 1
shawn
Top achievements
Rank 1
Share this question
or