Adds a map or imagery layer to the current drawing using the specified service properties asynchronously. The process will be executed outside the AutoLISP process. You will not get any further feedback. Use esri_maplayer_add for adding map or imagery layers with result feedback. The layer will use the current coordinate system of the drawing to which it was added. If the layer is added to a drawing containing no coordinate system, the drawing will inherit it from the layer.
Syntax
(esri_map_addasync url service_properties)
Arguments
- url | string | required | A valid path to an ArcGIS map or imagery layer.
- service_properties | associated List | optional | An associated list of map service properties as dotted pairs defined as follows:
Associated label Value type Value description Required or optional "TRANSPARENCY" Integer
Percentage of image transparency to apply to the map: {0-99: zero is opaque} (default = 30)
Optional
Example usage
Attempts to add the map or imagery layer from the given URL and set transparency to 70:
(esri_maplayer_addasync "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network/MapServer"
(list
(cons "TRANSPARENCY" 70)
)
)
Result example usage
Attempts to add the specified layer. The function doesn't wait for any feedback about success or failure and returns a list of true:
(T)
Return values
- If successful, returns a list of true: (T).
- If failed, it returns a list with the first value of nil and then an associated list containing the key value "Error" and an associated error message as a string: (nil ( "Error" . "<message>")).
Failed return values:
- (nil ("Error" . "Missing required
argument."))
The required argument is not supplied.
- (nil ("Error" . "This command requires a network connection."))
A network connection to the web layer's source is required to perform the function.
- (nil ("Error" . "Invalid URL."))
The URL provided is invalid.