Maptitude GISDK Help |
Adds a layer from a Esri (ArcView) Shapefile to a map.
AddShapeLayer(string map_name, string layer_name, string file_name, array options)
Argument |
Contents |
map_name |
The name of the map to which the layer is added |
layer_name |
The desired name for the layer in the map |
file_name |
The full path and file name of the Esri Shapefile |
Option |
Type |
Contents |
Read Only |
Boolean |
"True" to open read only, "False" (default) otherwise |
Shared |
Boolean |
"True" to open shared, "False" (default) otherwise; "False" sets the Exclusive mode |
NAD Conversion |
3 strings |
Input datum, output datum, and conversion file (if needed); the input and output datums should be different |
Projection |
String, array |
The projection name and the array of options |
Transform |
Array |
Array indicating the transformation to apply to coordinates in the file. This can have three forms: 1. An array of two or more four-element arrays containing local and world coordinates for control points, for example, {{real localX1, real localY1, real longitude1, real latitude1}, ...} 2. An array of four elements - {real X_multiplier, real Y_multiplier, real X_offset, real Y_offset} 3. Center and Extent transform {c1_x, c1_y, width_1, c2_x, c2_y, width_2} where center is shifted from (c1_x,c1_y) to (c2_x,c2_y), and vector of length width_1 out of c_1 becomes a vector of length width_2 out of c_2. |
A string indicating the actual name of the layer, which is identical to layer_name unless the layer name is already in use.
The type of features in the file is identified automatically.
Multi-point & multi-line features are not supported.
For more details on the NAD Conversion option, see Datum Conversions.
For more details on the Projection option, see Using Projections and Coordinate Systems.
AddShapeLayer(GetMap(), "Centerlines", "c:\\mysample.shp", {
{"Projection", "utm", {"zone=12", "units=m"}},
{"NAD Conversion", "NAD27", "NAD83",}
})
Error Type |
Meaning |
Error |
The file is not a valid Shapefile, or one of the parameters is invalid |
NotFound |
There is no file with the specified name |
Function |
Summary |
Adds an Esri (ArcView) Shapefile layer to an application without it appearing in a map or dataview |
|
Imports features from an Esri (ArcView) Shapefile into a geographic file |
©2025 Caliper Corporation | www.caliper.com |