Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Searches for a layer with the given name, passes it to the optional callback function (if provided), and returns it.

Parameters:

  • name (string): the name of the layer to search for

  • callback (function): (OPTIONAL) A callback function to execute. It will be passed the layer found, which may be null if no layer matches name.

Returns: A promise that resolves to layer (object): The layer matching name, or null if no layer matches name.

Code Sample

  • No labels