SqlGeometryDataAdapter.SpatialDataMember Property
Gets or sets the name of a spatial data member.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v18.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A String value. |
Example
To load shapes from a SQL Geometry datasource, do the following.
- Create a SqlGeometryDataAdapter object and assign it to the VectorLayer.Data property.
- Specify the SqlGeometryDataAdapter.ConnectionString,
SqlGeometryDataAdapter.SpatialDataMember
and SqlGeometryDataAdapter.SqlText properties.
Note
All table fields of the SQL data table loaded from the database will be provided as attributes values for each SqlGeometryItem object generated by the SqlGeometryDataAdapter.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-load-shapes-from-a-sql-geometry-datasource-t180275.
Imports System
Imports System.IO
Imports System.Windows
Namespace SqlGeometryDataAdapterExample
Partial Public Class MainWindow
Inherits Window
Private Const dbPath As String = "..\..\..\Data\SQLG.mdf"
Private connectionString_Renamed As String = "Data Source=(local);AttachDbFileName=" & Path.GetFullPath(Path.Combine(System.Reflection.Assembly.GetEntryAssembly().Location, dbPath)) & ";Database=SqlGeometryDemoDB;Integrated Security=True;MultipleActiveResultSets=True"
Public ReadOnly Property ConnectionString() As String
Get
Return connectionString_Renamed
End Get
End Property
Public Sub New()
InitializeComponent()
Me.DataContext = ConnectionString
End Sub
End Class
End Namespace
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SpatialDataMember property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.