This function returns the map or imagery layer properties for the specified layer index number.
Syntax
(esri_maplayer_get maplayerid)
Arguments
- maplayerid | integer | required | The index integer number associated with the layer that can be obtained using (esri_maplayers).
Example usage 1
Attempt to get the map layer properties for the index number 1 map layer.
(esri_maplayer_get 1)
Result example usage 1
Returns the map layer properties for the index 1 map layer.
(("Id" . 1) ("Name" . "ThreeLayers") ("ItemId" . "eecb1e37eb5b42c5a2d270a5454c17c0") ("ItemUrl" . "https://cadserver.esri.com/portal/home/item.html?id=eecb1e37eb5b42c5a2d270a5454c17c0") ("PortalUrl" . "https://cadserver.esri.com/portal/sharing/rest") ("ItemType" . "MapImageServiceLayer") ("IsConnected" . T) ("ServiceUri" . "https://cadserver.esri.com/server/rest/services/afaHarness/ThreeLayers/MapServer") ("SpatialReference" . "3857") ("Sublayer_0_Name" . "myGroupOfLayers") ("Sublayer_0_Visible" . T) ("Sublayer_1_Name" . "ETH_ThreeLayers_6543") ("Sublayer_1_Visible" . T) ("Sublayer_1_SourceSpRef" . "103122") ("Sublayer_2_Name" . "ETH_ThreeLayers_2882") ("Sublayer_2_Visible" . T) ("Sublayer_2_SourceSpRef" . "2882") ("Sublayer_3_Name" . "ETH_ThreeLayers_6425") ("Sublayer_3_Visible" . T) ("Sublayer_3_SourceSpRef" . "103002") ("Visible" . T) ("Transparency" . 30) ("Dynamic") ("DatumTransformations" ((("From" . "6543") ("To" . "3857") ("Transformation" ((("Direction" . "Reverse") ("Step" . "108354"))))) (("From" . "2882") ("To" . "3857") ("Transformation" ((("Direction" . "Forward") ("Step" . "1901"))))))))
Note:
Boolean type variables that are set to nil appear without the dotted pair notation when printed, like the ("Dynamic") variable in the example above. This is equivalent to ("Dynamic" . nil) and is processed in AutoLISP using the same methods.Example usage 2
Attempt to get the imagery layer properties for the index number 3 imagery layer.
(esri_maplayer_get 3)
Result example usage 2
Returns the imagery layer properties for the index 3 map layer.
(("Id" . 3) ("Name" . "CharlotteLAS") ("ItemType" . "RasterServiceLayer") ("IsConnected" . T) ("ServiceUri" . "https://sampleserver6.arcgisonline.com/arcgis/rest/services/CharlotteLAS/ImageServer") ("SpatialReference" . "102719") ("Visible" . T) ("Transparency" . 30) ("Dynamic" . T) ("Allow_Raster_Function" . T) ("ProcessingTemplate" . "RFTShadedReliefElevationColorRamp") ("ProcessingTemplateNames" ("None" "RFTAspectColor" "RFTHillshade" "RFTShadedReliefElevationColorRamp")))
Return values
This function returns a value.
- If successful, SERVICE_PROPERTIES [Associated List] returns an associated list of properties with dotted pairs containing the parameter and its value. The list of parameters will vary depending on the service.
- If failed, it returns a list with the first value of nil, and 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 the following reason:
- (nil ("Error" . "No item selected."))
Specified map layer not found.
- (nil ("Error" . "Missing required
argument."))
One or more of the required arguments was not supplied.
See also
(esri_maplayers)—Returns a list of map and imagery layer names in and their layer index numbers within the current drawing.