The esri_maplayer_remove function removes the specified map or imagery layer referenced by its map index number. Use the esri_maplayers function to get a list of map layers and their maplayerid values.
Syntax
(esri_maplayer_remove maplayerid)
Arguments
- maplayerid | integer | required | The index integer number associated with the layer that can be obtained using esri_maplayers.
Example usage
Attempt to remove the map reference in the drawing for the index number 1 map layer.(esri_maplayer_remove 1)
Result example usage
Remove the the map layer from the drawing and return a list of true:
(T)Return values
The following are the possible return values:
- If successful, the function returns a list of true: (T).
- If failed, it returns a list with the first value of nil; then, an associated list is returned containing the key value "Error" and an associated error message as a string: (nil ("Error" . "<message>")).
Failed return values
A failed return value can occur for any of the following reasons:
- (nil ("Error" . "Map layer not found."))
The specified map layer was not found.
- (nil ("Error" . "Missing required argument."))
A required argument was missing.