CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Multiple lines in hint text on a marker

by PeterSondergaard » 02 Jun 2014 14:07

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
PeterSondergaard
 
Posts: 12
Joined: 02 Jun 2014 13:56

by Jorge Sousa » 02 Jun 2014 18:32

Hi Peter

Have you tried with

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

?
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by PeterSondergaard » 02 Jun 2014 22:20

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?
PeterSondergaard
 
Posts: 12
Joined: 02 Jun 2014 13:56

by Jorge Sousa » 03 Jun 2014 00:07

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.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by PeterSondergaard » 03 Jun 2014 08:38

Hi again

Can you show an example of bold and italic for Chrome and Explorer?
PeterSondergaard
 
Posts: 12
Joined: 02 Jun 2014 13:56

by Alexander Bulei » 03 Jun 2014 09:36

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQGMap

Who is online

Users browsing this forum: No registered users and 5 guests

Contact Us.