Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Delete a KML Layer

 Post Reply Post Reply
kuhl klaus View Drop Down
New Member
New Member

Joined: 29 Oct 2014
Posts: 34
Post Options Post Options   Quote kuhl klaus Quote  Post ReplyReply Direct Link To This Post Topic: Delete a KML Layer
    Posted: 30 Nov 2014 at 8:18am

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;

Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support

Joined: 18 May 2010
Posts: 2219
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jan 2015 at 9:46am

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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down