The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



RemoveLandMark


Unit:SDL_geomap
Class:TGeoMap
Declaration: [1] function RemoveLandMark (Lat, Long: double; ClassFlag: integer; Radius: double): integer;
[2] function RemoveLandMark (Rect: TRectDouble; ClassFlag: integer): integer;
[3] function RemoveLandMark (Lat, Long: double; ClassFlag: integer): integer;
[3] function RemoveLandMark (LmIndex: integer): integer;

The function RemoveLandMark removes one or several landmarks from a map. There are four overloaded versions available which differ in the way how the landmarks are selected for removal:

The first version removes all landmarks within a circular area of radius Radius around the position [Lat/Long]. The second version removes all landmarks within a rectangular region defined by the parameter Rect. The third version removes the landmark which is nearest to the position [Lat/Long], and finally, the fourth version removes the landmark identified by its index LmIndex in the array LandmarkData.

The parameter ClassFlag determines which class of landmarks will be affected. Setting ClassFlag to values between 0 and 255 will allow only landmarks to be removed whose class number matches ClassFlag. If ClassFlag is set to -1, classes of landmarks do not influence the removal process.

The function returns the number of landmarks which have been removed.

Hint: Please note that the removal of landmarks triggers the event OnLandMarkAction. This event gives you the opportunity to decide for each selected landmark whether it should be removed or not.

Example: This method is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): simplegeomap



Last Update: 2014-Sep-08