| Maptitude GISDK Help |
Sets the position (drawing order) of a layer in a map.
SetLayerPosition(string map_name, string layer_name, integer new_position)
| Argument | Contents |
|---|---|
| map_name | The name of the map |
| layer_name | The name of the layer |
| new_position | The desired position (drawing order) of the layer within the map |
The first layer drawn has a position of one.
// Make sure the counties layer is the first layer
pos = GetLayerPosition("My Map", "Counties")
if pos <> 1 then SetLayerPosition("My Map", "Counties", 1)
| Error Type | Meaning |
|---|---|
| Error | The specified position is less than one or more than the number of layers in the map |
| NotFound | The map or layer does not exist |
| Function | Summary |
|---|---|
| GetLayerPosition() | Gets the position (drawing order) of a layer in a map |
| GetMapLayers() | Gets a list of the layers in a map |
| ©2025 Caliper Corporation | www.caliper.com |