Page 1 of 1

Multiple lines in hint text on a marker

PostPosted: 02 Jun 2014 14:07
by PeterSondergaard
Hi

I am trying to add markers to my map with a flyover hint text consisting of several lines
I have tried to modify the JQGMap3 example with the following code:

{PORTO}
LMarker:= Marker.Values.Add;
LMarker.Data := 'Porto';
LMarker.Options.Icon := 'http://update.ps-data.com/WTG Green.png';
LMarker.Options.Title := 'Line1\nLine2\nLine3\n';
LMarker.Options.ZIndex := 10000;

LMarker.LatLng.Latitude := 41.15668920;
LMarker.LatLng.Longitude := -8.623925399999999;

The Zindex for bringing the marker infront and the change of icon works perfectly but the title does not accept the \n

Is there anyone that can point me in the right direction

Regards
Peter

Re: Multiple lines in hint text on a marker

PostPosted: 02 Jun 2014 18:32
by Jorge Sousa
Hi Peter

Have you tried with

LMarker.Options.Title := 'Line1' + sLineBreak + 'Line2' + sLineBreak + 'Line3' + sLineBreak;

?

Re: Multiple lines in hint text on a marker

PostPosted: 02 Jun 2014 22:20
by PeterSondergaard
Hi

Thanks for the quick answer.

I have now tested the sLineBreak idea and it works perfectly.
Thanks.

Will this also work in c++ ?

Is there other possibilities like bold text and italics that can be used as well?

Re: Multiple lines in hint text on a marker

PostPosted: 03 Jun 2014 00:07
by Jorge Sousa
Hi Peter

Yes it will work in C++

About the title (hint) it will depend on the browser, but most likel,y will be accepted by all browsers.

Re: Multiple lines in hint text on a marker

PostPosted: 03 Jun 2014 08:38
by PeterSondergaard
Hi again

Can you show an example of bold and italic for Chrome and Explorer?

Re: Multiple lines in hint text on a marker

PostPosted: 03 Jun 2014 09:36
by Alexander Bulei
Hi Peter,

PeterSondergaard wrote:Hi again

Can you show an example of bold and italic for Chrome and Explorer?


The property "Title" doesn't accept the html, so it's impossible to do this.
You should use InfoWindow, check our demo for example:

delphi code
{LISBON}
LMarker:= Marker.Values.Add;
LMarker.Data:= '<strong>Lisbon</strong>';
LMarker.LatLng.Latitude:= 38.72529930;
LMarker.LatLng.Longitude:= -9.150036400000001;


Best Regards.