Skip To Content

esri_maplayer_get (AutoLISP)

This function gets the map or image 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

Attempt to get the map layer properties for the index number 1 map layer.

(esri_maplayer_get 1)

Result example usage

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" . T) ("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.

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; 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.