Delete a KML Layer

Hello,

the function DeleteMapKMLLayer expects the ID of the KMLLayer to delete.
How do I get it?
AddMapKMLLayer just returns a boolean:

    function AddMapKMLLayer(Url: string; ZoomToBounds: boolean = true): boolean;
    function DeleteMapKMLLayer(Id:integer): boolean;

Greetings

Hi,


You can manually keep track of the KML layer ID.
The first layer has ID 0, the ID is incremented by 1 for each extra layer added.

As an alternative you can remove all KML layers using the DeleteAllMapKMLLayer call, then add only the required KML layer(s) again.