Web API Reference MapGuide Open Source

INT32 MgLayerCollection::IndexOf CREFSTRING  name  ) 
 

Gets the index of the specified layer in the collection.

.Net Syntax
int IndexOf(string name);
Java Syntax
int IndexOf(String name);
PHP Syntax
int IndexOf(string name);

Parameters:
name (String/string) Name of the layer to search for.
Returns:
Returns the layer's index if the collection contains the specified layer, or false (-1) otherwise.