EXTERNAL FEEDS (GEORSS, KMZ)

6 posts, 0 answers
  1. MarieQB
    MarieQB avatar
    1 posts
    Member since:
    Jun 2010

    Posted 21 Jul 2010 Link to this post

    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?

     

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 22 Jul 2010 Link to this post

    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
  3. DevCraft banner
  4. Michael
    Michael avatar
    1 posts
    Member since:
    Feb 2011

    Posted 10 Mar 2011 Link to this post

    Do you have support for displaying GeoRSS feeds?  If so, please throw a quick code sample (or link to one).

    --Michael
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 15 Mar 2011 Link to this post

    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!
  6. shawn
    shawn avatar
    1 posts
    Member since:
    Mar 2011

    Posted 22 Mar 2011 Link to this post

    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?

  7. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 24 Mar 2011 Link to this post

    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
Back to Top
DevCraft banner