I've configured TagStrings for Markers, Polygon and Polylines.
They show on hovering with the mouse pointer over the objects.
All TagStrings have linefeeds, which were converted from CRLF to \n.
This works fine for Markers.TagString and Polygon.Tagstring, their hints show linefeeds.
The Polyline.Tagstring is shown in one line and does not respect the linefeeds.
with WebGMap.Polylines.Add() do
begin
with Polyline do
begin
TagString := StringReplace(GPSTracks[Track].ToShortString(0, MyFormatSettings),
CRLF, '\n', [rfReplaceAll]); //Titel ;
begin
with Polyline do
begin
TagString := StringReplace(GPSTracks[Track].ToShortString(0, MyFormatSettings),
CRLF, '\n', [rfReplaceAll]); //Titel ;
The ToShortString() method looks like this:
function TTrack.ToShortString(Indent: Byte; MyFormatSettings: TFormatSettings): string;
var
IndentStr: string;
begin
IndentStr := StringOfChar(' ', Indent);
Result :=
IndentStr + 'Name = ' + Self.Name + CRLF +
IndentStr + 'Description = ' + Self.Description + CRLF +
IndentStr + 'Tracktype = ' + Self.TrackTypeAsString + CRLF +
IndentStr + 'Duration = ' + Self.DurationAsString + CRLF +
IndentStr + 'Distance = ' + Self.DistanceAsString(MyFormatSettings) + CRLF +
IndentStr + 'Trackpoints = ' + IntToStr(Self.TrackpointsCount) + CRLF +
IndentStr + 'Waypoints = ' + IntToStr(Self.WayPointsCount);
end;
var
IndentStr: string;
begin
IndentStr := StringOfChar(' ', Indent);
Result :=
IndentStr + 'Name = ' + Self.Name + CRLF +
IndentStr + 'Description = ' + Self.Description + CRLF +
IndentStr + 'Tracktype = ' + Self.TrackTypeAsString + CRLF +
IndentStr + 'Duration = ' + Self.DurationAsString + CRLF +
IndentStr + 'Distance = ' + Self.DistanceAsString(MyFormatSettings) + CRLF +
IndentStr + 'Trackpoints = ' + IntToStr(Self.TrackpointsCount) + CRLF +
IndentStr + 'Waypoints = ' + IntToStr(Self.WayPointsCount);
end;