function InsertLayer(layerClass: TLayer32Class; parent: TLayer32; index: integer; const name: string = ''''): TLayer32;

Creates a new layer, inserting it as a child of parent with the specified index (level). Layers above the inserted layer (with larger index numbers) will have their indexes adjusted automatically. If the index is equal to or higher than the number of layers in that group, the new layer will be added to the top of that group.