Collapse All Expand All Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: JavaScript

Visual Basic
C#
Visual C++
JavaScript

Easy GIS .NET API Reference
SFMap..::.AddShapeFile Method
SFMap Class See Also Send Feedback

Adds a new ShapeFile layer to the map

Namespace: EGIS.Controls
Assembly: EGIS.Controls (in EGIS.Controls.dll)

# Syntax

Visual Basic (Declaration)
    Public Function AddShapeFile ( _
    	path As String, _
    	name As String, _
    	labelFieldName As String _
    ) As ShapeFile

C#
    public ShapeFile AddShapeFile(
    	string path,
    	string name,
    	string labelFieldName
    )

Visual C++
    public:
    ShapeFile^ AddShapeFile(
    	String^ path,
    	String^ name,
    	String^ labelFieldName
    )

#### Parameters

path
  Type: System..::.String
  The file path to the ShapeFile

name
  Type: System..::.String
  The "display" name of the ShapeFile.

labelFieldName
  Type: System..::.String
  The name of the field in the ShapeFiles's DBF file to use when rendering the shape labels

#### Return Value

Returns the created ShapeFile which was added to the SFMap

# Remarks

After the shapefile is added to the map, the map will auto fit the entire ShapeFile in the control by adjusting the current ZomLevel and CentrePoint accordingly.

# See Also

SFMap Class
EGIS.Controls Namespace