Print Page | Close Window

Delete a KML Layer

Printed From: TMS Software
Category: FMX Components
Forum Name: FMX WebGMaps / WebOSMaps
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=4589
Printed Date: 20 Jan 2020 at 1:47am


Topic: Delete a KML Layer
Posted By: kuhl klaus
Subject: Delete a KML Layer
Date Posted: 30 Nov 2014 at 8:18am
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



Replies:
Posted By: Bart Holvoet
Date Posted: 28 Jan 2015 at 9:46am
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.




Print Page | Close Window