The SqlServerLayer class provides access to spatial and attribute data stored in a SQL Server database.


Namespace: AspMap.Data
Assembly: AspMapNET (in AspMapNET.dll)

Syntax

Visual Basic (Declaration)
Public Class SqlServerLayer
    Inherits SpatialDatabaseLayer
C#
public class SqlServerLayer : SpatialDatabaseLayer
C++
ref class SqlServerLayer : SpatialDatabaseLayer
J#
public class SqlServerLayer extends SpatialDatabaseLayer
JScript
public class SqlServerLayer extends SpatialDatabaseLayer

Remarks

This class supports the SQL Server Geography and Geometry data types and spatial indexes.

The FieldList property should be specified if attribute data from the database is necessary (for labeling, quering, or editing purposes).

The extent of database layers is not calculated automatically for performance reasons. If you use only database layers in your application, you should set the Extent property before adding the layer to the map.

By default, the extent of database layers is set to (-180,90,180,-90) (units are decimal degrees). The coordinate system is set to WGS 1984 (EPSG/SRID code is 4326).

Note
The Geography type of SQL Server 2008 does not support filter shapes/extents that span more than half of the Earth's surface. SQL Server 2012 is free from this limitation.

Inheritance Hierarchy

System.Object
   AspMap.Data.SpatialDatabaseLayer
      AspMap.Data.SqlServerLayer

Thread Safety

Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

See Also