New to Telerik UI for WPFStart a free 30-day trial

Base class for the asynchronous map shape readers (KML, ESRI, WKT/WKB).

Definition

Namespace:Telerik.Windows.Controls.Map

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

C#
public abstract class AsyncReaderBase : Freezable

Inheritance: objectAsyncReaderBase

Derived Classes: AsyncFileReaderBaseAsyncSqlGeospatialDataReader

Constructors

C#
protected AsyncReaderBase()

Fields

ClearLayerProperty

DependencyProperty

Identifies the ClearLayer dependency property.

C#
public static readonly DependencyProperty ClearLayerProperty

CoordinateConverterProperty

DependencyProperty

Identifies the CoordinateConverter dependency property.

C#
public static readonly DependencyProperty CoordinateConverterProperty

ExtendedPropertySetProperty

DependencyProperty

Identifies the ExtendedPropertySet dependency property.

C#
public static readonly DependencyProperty ExtendedPropertySetProperty

ToolTipFormatProperty

DependencyProperty

Identifies the ToolTipFormat dependency property.

C#
public static readonly DependencyProperty ToolTipFormatProperty

ToolTipStyleProperty

DependencyProperty

Identifies the ToolTipStyle dependency property.

C#
public static readonly DependencyProperty ToolTipStyleProperty

ToolTipTemplateProperty

DependencyProperty

Identifies the ToolTipTemplate dependency property.

C#
public static readonly DependencyProperty ToolTipTemplateProperty

Properties

Gets or sets the ClearLayer property. If it is set to true, then the reader clears its information layer after reading.

C#
public bool ClearLayer { get; set; }

Gets or sets the CoordinateConverter applied to the reader.

C#
public ICoordinateConverter CoordinateConverter { get; set; }

Gets or sets extended property set which will be used during shape file (KML or ESRI) reading.

C#
public ExtendedPropertySet ExtendedPropertySet { get; set; }
Remarks:

Can be null. In this case extended property set will be created depends on the extended data available in the KML file or in the attributes file (DBF).

Target visualization layer.

C#
public VisualizationLayer Layer { get; set; }

Gets or sets tooltip format. Either ToolTipFormat or ToolTipTemplate should be specified. If both properties are set, then ToolTipTemplate will be used.

C#
public string ToolTipFormat { get; set; }
Example:

The tooltip format can be specified in a few different ways: as simple name of the extended property, as formatted extended property, or as format string which can use number of the extended properties.

        <pre><code class="lang-csharp">this.visualizationLayer.Reader = new AsyncShapeFileReader();

// Using of the single extended property name. this.visualizationLayer.Reader.ToolTipFormat = "CNTRY_NAME";

// Using of the formatted extended property. // The '|' character is used to separate extended property name and its output format. this.visualizationLayer.Reader.ToolTipFormat = "SUM_SQMI_A|F2";

// Format string with number of the extended properties. this.visualizationLayer.Reader.ToolTipFormat = "{CNTRY_NAME} Miles: {SUM_SQMI_A|F2}, KM: {SUM_SQKM_A|F1}";

Me.visualizationLayer.Reader = New AsyncShapeFileReader()

' Using of the single extended property name. Me.visualizationLayer.Reader.ToolTipFormat = "CNTRY_NAME"

' Using of the formatted extended property. ' The '|' character is used to separate extended property name and its output format. Me.visualizationLayer.Reader.ToolTipFormat = "SUM_SQMI_A|F2"

Format string with number of the extended properties. Me.visualizationLayer.Reader.ToolTipFormat = "{CNTRY_NAME} Miles: {SUM_SQMI_A|F2}, KM: {SUM_SQKM_A|F1}"

<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa"
ToolTipFormat="CNTRY_NAME">

<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa" ToolTipFormat="SUM_SQMI_A|F2">

<telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa" ToolTipFormat="{}{CNTRY_NAME} Miles: {SUM_SQMI_A|F2}, KM: {SUM_SQKM_A|F1}">

.

Gets or sets the style applied to the toolTip.

C#
public Style ToolTipStyle { get; set; }

ToolTipTemplate

DataTemplate

Gets or sets tooltip content template. Either ToolTipFormat or ToolTipTemplate should be specified. If both properties are set, then ToolTipTemplate will be used. You can bind elements in the tooltip template to extended properties using ExtendedDataConverter and Data property of the ExtendedData object.

C#
public DataTemplate ToolTipTemplate { get; set; }
Example:
        This example demonstrates how the tooltip template can be set.

        <pre><code class="lang-csharp"><telerik:AsyncShapeFileReader Source="/Telerik.RadMap.Silverlight;component/africa">
<telerik:AsyncShapeFileReader.ToolTipTemplate>
	<DataTemplate>
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>

			<TextBlock Grid.Column="0" Grid.Row="0" Text="Name:" />
			<TextBlock Grid.Column="1" Grid.Row="0" 
				Text="{Binding Path=Data[CNTRY_NAME]}" />

			<TextBlock Grid.Column="0" Grid.Row="1" Text="Population:" />
			<TextBlock Grid.Column="1" Grid.Row="1" 
				Text="{Binding Path=Data, Converter={StaticResource ExtendedDataConverter}, ConverterParameter='\{SQKM|#,#.0\}'}" />

			<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" 
				Text="{Binding Path=Data[Area (MI) \=\{SQMI|F1\} Population\=\{POP_CNTRY|F0\}]}" />
		</Grid>
	</DataTemplate>
</telerik:AsyncShapeFileReader.ToolTipTemplate>

</telerik:AsyncShapeFileReader> .

Methods

Cancels loading of shapes.

C#
public void CancelAsync()

Cancels loading of shapes by process id.

C#
public void CancelAsync(int processId)
Parameters:processIdint

Id of the process.

When implemented in a derived class, creates a new instance of the Freezable derived class.

C#
protected override Freezable CreateInstanceCore()
Returns:

Freezable

Null.

Occurs when the properties which are used for loading are changed.

C#
protected virtual void OnReaderPropertyChanged(DependencyPropertyChangedEventArgs eventArgs)
Parameters:eventArgsDependencyPropertyChangedEventArgs

Event arguments.

Reads geospatial data using asynchronous mode.

C#
public abstract int ReadAsync()
Returns:

int

Reads geospatial data using asynchronous mode.

C#
public abstract int ReadAsync(object userState)
Parameters:userStateobject

A user-defined object that is passed to the method invoked when the asynchronous operation completes.

Returns:

int

Starts loading when the properties which are used for loading are changed.

C#
protected static void ReaderPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
Parameters:sourceDependencyObject

Source object.

eventArgsDependencyPropertyChangedEventArgs

Event arguments.

Events

Occurs when a shape data is read.

C#
public event PreviewReadShapeDataCompletedEventHandler PreviewReadShapeData

Occurs when the reader completes to read shapes.

C#
public event PreviewReadShapeDataCompletedEventHandler PreviewReadShapeDataCompleted

Occurs when part of data is read.

C#
public event ProgressChangedEventHandler ProgressChanged

Occurs when the reader completes to read shapes and pass them to target information layer.

C#
public event ReadShapeDataCompletedEventHandler ReadShapeDataCompleted