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

Geospatial data in SQL Server 2008

4 Answers 96 Views
Map
This is a migrated thread and some comments may be shown as answers.
Yan Moura
Top achievements
Rank 1
Veteran
Iron
Yan Moura asked on 08 Sep 2011, 08:02 PM
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!

4 Answers, 1 is accepted

Sort by
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 12 Sep 2011, 04:39 PM
Hello Yan,

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


Greetings,
Bart.
0
Yan Moura
Top achievements
Rank 1
Veteran
Iron
answered on 12 Sep 2011, 07:29 PM
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>
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 13 Sep 2011, 01:40 PM
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.
0
Yan Moura
Top achievements
Rank 1
Veteran
Iron
answered on 13 Sep 2011, 07:11 PM
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
Tags
Map
Asked by
Yan Moura
Top achievements
Rank 1
Veteran
Iron
Answers by
Bartholomeo Rocca
Top achievements
Rank 1
Yan Moura
Top achievements
Rank 1
Veteran
Iron
Share this question
or