Geospatial data in SQL Server 2008

5 posts, 0 answers
  1. Yan Moura
    Yan Moura avatar
    33 posts
    Member since:
    Feb 2010

    Posted 08 Sep 2011 Link to this post

    Hello!

    I am having some fun with RadMap, and I already can load a desired location (pan) in the screen and zoom it programatically. :)

    Now I having a hard time trying to draw a polygon area onto the location.

    I have a set of coordinates saved in SQL Sever 2008 (Geospatial data), but I don't know how to tell to RadMap to pick those coordinates and trace a polygon with them.

    There is someone out there that has a nice and simple sample code showing how to do that?

    Thanks!
  2. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 12 Sep 2011 Link to this post

    Hello Yan,

    Check the following help article and the following example to get you started.


    Greetings,
    Bart.
  3. DevCraft banner
  4. Yan Moura
    Yan Moura avatar
    33 posts
    Member since:
    Feb 2010

    Posted 12 Sep 2011 Link to this post

    Hey Bart,

    This example is really great and I think it has everything to get started! Thank you for that!

    Nonetheless, I am trying to transport some of the sample code to my own application and now I am unable to compile my app because the following error message:

    "Error    1 The tag 'SqlGeospatialDataReader' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'."
    "Error    2 The type 'telerik:SqlGeospatialDataReader' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built."


    Obviously the SqlGeospatialDataReader class is missing, but I have no idea how to fix it.

    I have the VS-2010 Pro, SL 4 and RadControls for Silverlight Q1 2011 installed. Any clue?

    Thanks,

    Yan

    Here, my "MainPage.XAML" code:

    <UserControl x:Class="YV_GIS.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        d:DesignHeight="452" d:DesignWidth="872"
        xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

        <Grid x:Name="LayoutRoot" Background="White" Height="482" Width="872">
            <telerik:RadMap x:Name="radMap"
                   Width="600"
                   Height="480">
                
                <telerik:InformationLayer>
                    <telerik:InformationLayer.Reader>
                        <telerik:SqlGeospatialDataReader>
                        </telerik:SqlGeospatialDataReader>
                    </telerik:InformationLayer.Reader>
                </telerik:InformationLayer>
            </telerik:RadMap>
        </Grid>

    </UserControl>
  5. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 13 Sep 2011 Link to this post

    Hello Yan,

    I believe support for SQL geospatial data was added for Q2 2011 so you will probably need to upgrade. Check the release history here: http://www.telerik.com/products/silverlight/whats-new/release-history/q2-2011-version-2011-2-0712.aspx.


    Greetings,
    Bart.
  6. Yan Moura
    Yan Moura avatar
    33 posts
    Member since:
    Feb 2010

    Posted 13 Sep 2011 Link to this post

    Hey Bart,

    Thanks for all the heads up, it worked now! :)

    I downloaded the latest update, installed it and then ran the upgrade wizard against my project just to see my application to compile and run without any error message!

    Now I am back to the business! ;)

    Thanks a lot!

    Yan
Back to Top
DevCraft banner