Welcome to the new home of Plan-G.
We are endeavouring to bring the old forum data across to the new one, but you will need to re-register here.
Old forum archive: https://plan-g.app/oldforum/index.php

KML/KMZ Description html tags

Post Reply
willasm
Posts: 5
Joined: Mon Sep 18, 2023 11:47 am
Contact:

KML/KMZ Description html tags

Post by willasm »

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.
willasm
Posts: 5
Joined: Mon Sep 18, 2023 11:47 am
Contact:

Re: KML/KMZ Description html tags

Post by willasm »

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.
Tim
Site Admin
Posts: 207
Joined: Tue Nov 29, 2022 3:32 pm
Contact:

Re: KML/KMZ Description html tags

Post by Tim »

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.
willasm
Posts: 5
Joined: Mon Sep 18, 2023 11:47 am
Contact:

Re: KML/KMZ Description html tags

Post by willasm »

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 3592 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>
Post Reply