Plan-G
https://plan-g.app/
Print view

KML/KMZ Description html tags
https://plan-g.app/viewtopic.php?t=74
Page 1 of 1
Author:  willasm [ Wed Sep 20, 2023 5:15 pm ]
Post subject:  KML/KMZ Description html tags

I have started creating a KML for Plan-g and one of the first things I have noticed is that in the description field, the only html tag that seems to be supported is the break tag. I have tried a couple others like font color, bold, etc. but none of them work.

Tim, can you let me know what other tags are supported if any? If only the line break tag is supported, I can work with that and continue on. If others are supported, please list them here so I know what I have to work with.

Thanks for your help, William.
Author:  willasm [ Wed Sep 20, 2023 7:34 pm ]
Post subject:  Re: KML/KMZ Description html tags

Another thing I noticed. Should the check boxes for polygons and markers not toggle their views? Currently the are shown/hidden only when the file is loaded. Changing the checked state after loading has no effect.
Author:  Tim [ Fri Sep 22, 2023 10:26 am ]
Post subject:  Re: KML/KMZ Description html tags

It's been a long time since I did anything with KML, so I'm going to need to look at the code and refresh my memory. I'll get back to you.
Author:  willasm [ Fri Sep 22, 2023 7:04 pm ]
Post subject:  Re: KML/KMZ Description html tags

It just occurred to me that you are just using a standard tooltip control so as it is it will not support any html tags. Maybe you should consider setting its style to Balloon (TTS_BALLOON) which will allow the kml's name entry to be bolded at the top. It also has the benefit of supporting an icon. It has been far too long since I wrote any programs using tooltips, need to bit of research on this but as I recall the title of a balloon does support html tags?

You must be parsing the text yourself as when I try to use "\r\n" it just displays the text instead of adding a line break, however if I use <br></br> it does insert a line break. Also noticed that the closing </br> is required which technically isn't required for html. The reason I mention this is all the POI's in the ORBX kml's use this method. See picture below...
HTML-Tags.jpg
HTML-Tags.jpg (93.66 KiB) Viewed 3596 times
Thanks for taking the time to look at this, William.

Edit: Open image in new tab to get a larger view of it.

Edit2: Just realized in the image above the line breaks are not closed. Also the <B> and </B> are for bolded text. These should be stripped for a tooltip control. Here is a list of other possibilities...

Code: Select all

      Styles: <i>Italics</i>, <b>Bold</b>, <u>Underlined</u>, 
      <s>Strike Out</s>, subscript<sub>subscript</sub>,
      superscript<sup>superscript</sup>,  
      <big>Big</big>, <small>Small</small>, <tt>Typewriter</tt>,
      <em>Emphasized</em>, <strong>Strong</strong>, <code>Code</code>
All times are UTC Page 1 of 1