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

SqlGeospatialDataReader Select Points

3 Answers 55 Views
Map
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 15 Feb 2015, 01:14 PM
Hello!

I am using SqlGeospatialDataReader as InformationLayer.Reader.     
                        
<telerik:SqlGeospatialDataReader Source="{Binding Grundstücke}"
                                 GeospatialPropertyName="WKTGeo"
                                 ToolTipFormat="{}ID: {ID} {Riede} Reihen: {Reihen}">
    <telerik:SqlGeospatialDataReader.PointTemplate>
        <DataTemplate>
            <Ellipse Width="8" Height="8" Fill="Black" Stroke="White" StrokeThickness="1" />
        </DataTemplate>
    </telerik:SqlGeospatialDataReader.PointTemplate>
</telerik:SqlGeospatialDataReader>

Is there something like a Selected Point template? To visually see, what point is selected. My WKT data is Multipoint. I also would like every multipoint from a WKT beeing selected, when one is clicked. Can this be done with SqlGeospatialDataReader?

And is it beeng synched with the selection of the underlaying QueryableEntityCollectionView thats the itemsource for the SqlGeospatialDataReader?

greetings

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 19 Feb 2015, 06:59 AM
Hello,

We are currently working on this scenario. However, we will need more time to provide you with information. We will write back as soon as we have something to share.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Accepted
Martin Ivanov
Telerik team
answered on 19 Feb 2015, 03:37 PM
Hello Alexander,

The map's InformationLayer does not have a built-in selection support, which mean that the data reader also does not provide a template for a selected point. In order to achieve such functionality you can write custom code that handles this scenario. For example you can attach for the mouse left button down event of the element in the PointTemplate and implement the selection there.

Note that the map control provides two rendering engine packs - the old one consists of the the InformationLayer, VirtualizationLayer and DynamicaLayer. The new one is implemented through the VisualizationLayer and it has few new features, and also improved performance. One the those features is the built-in selection which you can use for your requirement. However, you will need to implement the logic for changing the color of all points. What you can do is basically to subscribe for the SelectionChanged event of the visualization layer and inside of its handle to change the colors and manually update your QueryableEntityCollectionView.

For your convenience I prepared a project that includes an example implementation of such approach. You can find it in the attachment.

You can also consider to wrap the data from the reader into view models. This will allow you more flexible control over the layer and its items.

Regards,
Martin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alexander
Top achievements
Rank 1
answered on 21 Feb 2015, 07:33 PM
Hello Martin!

Thanks for your example. I wrapped my data into a MapItem object and passed it to the VisualizationLayer.
But this approach with looks better :-)

I didn't know that i can access the other Properties of my Object via the ExtendedData. Thanks for your help!

greetings
Alexander
Tags
Map
Asked by
Alexander
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Martin Ivanov
Telerik team
Alexander
Top achievements
Rank 1
Share this question
or