Linefeed/Newline in TWebGMaps.Markers[id].Title

when trying to add a newline/linefeed to a markers title it leads to a google script error.

  WebGMaps1.Markers[id].Title:='String 1'+#10#13+'String 2';

is there a way to set marker titles with newlines when using this VCL component?
it definitely is possible in google maps at all...

thank you


You can add a new line by using "\n".

  WebGMaps1.Markers[id].Title:='String 1\nString 2';

thank you!

I'm using WebGMAPS for VCL v2.6.1.0 and saw the method to add "newlines" to the title block.   The example in the e-mail showed a Delphi example, but I run the C++ Builder version and have tried on both XE4 and Berlin 10.1.2.   I get a script error message from both versions of C++ Builder and the latest WebGMaps library version.

Here is a simple function:
void __fastcall TForm1::WebGMaps1MapDblClick(TObject *Sender, double Latitude, double Longitude,
    int X, int Y)
 WebGMaps1->Markers->Add(Latitude, Longitude, "this \n that ", "9");

When double clicking on my map I get a Script Error dialog box with the message:  "Unterminated string constant" as the error. 

If I remove the "\" character everything is fine but I haven't figured out how to get a newline as advertised.

Are there differences between the C++ Builder library and the Delphi library?   Or am I missing something?


For C++ Builder an additional backslash character is required to escape the backslash.

WebGMaps1->Markers->Add(Latitude, Longitude, "this \n that ", "9");

   Thanks!!    It worked like a champ!   :)