I use SqlGeoSpatialDataReader to create all the shapes in the
information layer as shown below.My dataset has mixure of points ,
polygons and polylines... and so on.
I use SqlGeospatialDataReader.PointTemplate to customize how my
points shouldlook like in the map also my datatemplate handles the
click even of that point.
For all other shapes there is no template to specificy so it falls
back to ShapeFill settings in the information layer.
1. How can add a click event to all the other shapes without a datatemple ?
2. How can I bind some tag property to the shpes like I did for points
in PointTemplate ?
3. How can I use Extendada data binding to set the FillColor in the ShapeFill
definition ?
<telerik:InformationLayer x:Name="informationLayer">
<telerik:InformationLayer.Reader>
<telerik:SqlGeospatialDataReader Source="{Binding POIList}"
GeospatialPropertyName="Geometry"
ToolTipFormat="POIId"
ReadCompleted="SqlGeospatialDataReader_ReadCompleted">
<telerik:SqlGeospatialDataReader.PointTemplate>
<DataTemplate>
<Border Width="16"
Height="16"
Tag="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='POIId'}"
MouseLeftButtonDown="OnMapEntityClicked">
<Path Data="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='IconDefinition'}"
Height="Auto"
Width="Auto"
Tag="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='POIId'}"
Stretch="Uniform"
Fill="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='FillColor'}"
StrokeThickness="1"
Cursor="Hand">
</Path>
</Border>
</DataTemplate>
</telerik:SqlGeospatialDataReader.PointTemplate>
</telerik:SqlGeospatialDataReader>
</telerik:InformationLayer.Reader>
<telerik:InformationLayer.ShapeFill>
<telerik:MapShapeFill Stroke="DarkGreen"
Fill= ???? Use extended data property to fill color binding ????
StrokeThickness="10" />
</telerik:InformationLayer.ShapeFill>
<telerik:InformationLayer.HighlightFill>
<telerik:MapShapeFill Stroke="Orange"
StrokeThickness="10" />
</telerik:InformationLayer.HighlightFill></telerik:InformationLayer>