Class TMapMarkList

Unit

Declaration

type TMapMarkList = class(TChildObjList<TMapMark>)

Description

List of mapmarks. Items are sorted by layer number and painted in this order, ascending

Hierarchy

Overview

Methods

Public function Find(const GeoCoords: TGeoPoint; Options: TMapMarkFindOptions = []; StartIndex: Integer = -1): Integer; overload;
Public function Find(const GeoRect: TGeoRect; Options: TMapMarkFindOptions = []; StartIndex: Integer = -1): Integer; overload;
Public function Find(const MapPt: TPoint; Options: TMapMarkFindOptions; StartIndex: Integer): Integer; overload;
Public function Find(Data: Pointer): Integer; overload;
Public function NewItem: TMapMark;
Public function Add(const GeoCoords: TGeoPoint; const Caption: string; Layer: TMapLayer = 0): TMapMark; overload;

Description

Methods

Public function Find(const GeoCoords: TGeoPoint; Options: TMapMarkFindOptions = []; StartIndex: Integer = -1): Integer; overload;

Find the next map mark that is near specified coordinates.

Samples:

  1. Check if there's any map marks at this point:

    if Find(Point) <> -1 then ...

  2. Select all map marks at this point

    idx := -1;
    repeat
      idx := MapMarks.Find(Point, [], idx);
      if idx = -1 then Break;
      ... do something with MapMarks[idx] ...
    until False;

Parameters
GeoCoords
- coordinates to search
Options
- set of search options
StartIndex
- index of previous found mapmark in the list. -1 (default) will start from the 1st element
Returns

index of mapmark in the list, -1 if not found.

Public function Find(const GeoRect: TGeoRect; Options: TMapMarkFindOptions = []; StartIndex: Integer = -1): Integer; overload;

The same as above but searches within specified rectangle

Public function Find(const MapPt: TPoint; Options: TMapMarkFindOptions; StartIndex: Integer): Integer; overload;

The same as above but searches by map point in pixels

Public function Find(Data: Pointer): Integer; overload;

Find map mark by its Data field

Parameters
Data
- value to search for
Returns

index of mapmark in the list having Data field same as Data, -1 if not found.

Public function NewItem: TMapMark;

Create TMapMark object and initially assign values from owner map's fields

Public function Add(const GeoCoords: TGeoPoint; const Caption: string; Layer: TMapLayer = 0): TMapMark; overload;

Simple method to add a mapmark by coords, caption and layer


Generated by PasDoc 0.16.0.