| Maptitude GISDK Help |
Removes a layer from an application.
From Version 5.0 drops any associated node layer.
DropLayerFromWorkspace(string layer_name)
| Argument | Contents |
|---|---|
| layer_name | The layer to be dropped |
If the layer appears in any map or editor, or if it is part of a joined view, it cannot be dropped with DropLayerFromWorkspace().
DropLayerFromWorkspace() drops any associated node layer.
lyr = AddLayerToWorkspace("Counties", "cccntyl.cdf", "County (Low Res)")
nrecs = GetRecordCount(lyr)
DropLayerFromWorkspace(lyr)
ShowMessage("There are " + String(nrecs) + " counties.")
| Error Type | Meaning |
|---|---|
| Error | The layer is in use, and cannot be dropped |
| NotFound | The specified layer does not exist |
| Function | Summary |
|---|---|
| AddLayerToWorkspace() | Adds a layer to an application without it appearing in a map or dataview |
| DropLayer() | Removes a layer from a map |
| ©2025 Caliper Corporation | www.caliper.com |