Text background color in Balloons

725 views
Skip to first unread message

BobJordanB

unread,
Jun 23, 2010, 7:25:06 AM6/23/10
to KML Developer Support - Getting Started with KML
Somethings changed?

My balloons have recently taken on a white background around the text
where before it was all the chosen background colour.

My style contains

<BalloonStyle>
<displayMode>default</displayMode><bgColor>ff99fbff</bgColor>
<text><![CDATA[<font face="Comic Sans MS" /><b>Trap $[name]</b><br/
><br/>$[description]]]></text>
</BalloonStyle>

The bulk of the balloon goes to the tan color I chose but the centre
region where the text is all goes to white.

I have lots of styles that contain this and all are affected.
Its as though a more global change has occurred.

I am at a loss as to where to look for this fault?
Please show me my stupidity or suggest where to look.

They used to work great a couple of weeks ago.

I am using a PowerPC iMac under

Google Earth 5.1.3533.1731
Build Date Nov 11, 2009
Build Time 4:14:57 pm
Renderer OpenGL
Operating System Mac OS X (10.4.11)
Video Driver NVIDIA NV34MAP OpenGL Engine (1.5 NVIDIA-1.4.18)
Max Texture Size 4096x4096
Server kh.google.com


Bob J.

shannon9585

unread,
Jun 23, 2010, 2:32:53 PM6/23/10
to KML Developer Support - Getting Started with KML
I doubt this is this issue, but maybe try upgrading to GE version
5.2.1.1329 (beta)

Maarten L

unread,
Jun 23, 2010, 2:49:37 PM6/23/10
to KML Developer Support - Getting Started with KML
Maybe it has to do with the value of the $[description] entity. Do
your <description> tags contain any html that could set the background
color to white?

BobJordanB

unread,
Jun 23, 2010, 7:48:20 PM6/23/10
to KML Developer Support - Getting Started with KML
Two replies to answer questions by Shannon and Maarten

On Jun 24, 6:32 am, shannon9585 wrote:
> I doubt this is this issue, but maybe try upgrading to GE version
> 5.2.1.1329 (beta)


I will try that - did not realise there had been an update offered.

BUT this problem has turned up recently and it is some time since I
upgraded to 5.1.3533.1731

So my backgrounds 'were' OK some weeks ago under this version. But not
now!

I have clearly changed something but cannot see what that would be?


On Jun 24, 6:49 am, Maarten L wrote:
> Maybe it has to do with the value of the $[description] entity. Do
> your <description> tags contain any html that could set the background
> color to white?

The problem occurs on all balloons. Some are simple and the
description field would be like this:

<description><![CDATA[Trap Type: TT<br/>Started: Sep08<br/>No. Visits:
29<br/>Trap Efficiency: 24%<br/>Trip Loss: 0%<br/>Catch to date: 2Stt
4Rat 1Rab ]]></description>

Others are very complex and have tables with 26+ rows and 15 columns
and do manipulate the background but to the same tan color.

None set backgrounds to white.

But even if those ones did - this simple one above should not be
white.

I wonder if it is a bug?

But its probably me! :-(

Thanks to you both.


Bob J.

Nymor

unread,
Jun 23, 2010, 9:33:15 PM6/23/10
to KML Developer Support - Getting Started with KML
Hi,

This is probably me coming from slightly left field here but I noticed
something weird start to happen with the previous version and in my
tiny brain a have a vague connection with your problem .... very vague
I think.

I've been using iFrame shims to float divs above the GE window and was
recently rebuilding some code to change the content of these divs. The
odd thing was though that the content div was floating over GE before
I'd added the iFrame shim code??

I thought my luck was in (shims are a pain when you want to drag drop
them on IE) - however my joy was shortlived as this only happened on
my Win2000 PC with FF3 - on XP with both FF and IE the divs behaved as
they have in the past - layering themselves under GE when no iFrame
shim is applied.

On this page
http://www.thekmz.co.uk/GEPlugin/test/shim_test4/shim_test4_odd.htm
I create 2 divs - one shimmed and one not (and position them over the
edge of GE). On my Win2000/FF3 PC both divs appear completely above GE
whereas on XP (FF& IE) the top half of the 1st div (non-shimmed) is
not visible.

Very strange ... and something I'd like to know a bit more about.

... but what is this vague connection I've made to the OP's issue?
Well I remember reading that Balloons use the iFrame shim technique to
position themselves above GE and maybe there's something in the way
GE, iFrames and various OSs interact - me on Win2000 and you on the
MAC.

I also noticed (can't remember when but recently) that I now get a
"block" tab from AdBlock Plus on the GE window which I can't remember
seeing before.

Maybe something has changed in the way the Plugin is presented by the
browser and this creates odd behaviour in certain configurations?

Maybe your issue is something like parts of the ballon content going
transparent and rather than being white itself it is allowing the
background colour to come through. If your GE div is a child of the
<body>, for example, does changing the background colour of the <body
> change the unwanted colour within your balloons?

... I said it was tenuous but there's certainly been some change in
behaviour somewhere along the way.

Nymor

Nymor

unread,
Jun 23, 2010, 9:36:14 PM6/23/10
to KML Developer Support - Getting Started with KML
.... just noticed the OP was referring to GE itself rather than the
Plugin ... but presumably they share some of their codebase so maybe
there is still a link somewhere?

Nymor



On Jun 24, 2:33 am, Nymor wrote:
> Hi,
>
> This is probably me coming from slightly left field here but I noticed
> something weird start to happen with the previous version and in my
> tiny brain a have a vague connection with your problem .... very vague
> I think.
>
> I've been using iFrame shims to float divs above the GE window and was
> recently rebuilding some code to change the content of these divs. The
> odd thing was though that the content div was floating over GE before
> I'd added the iFrame shim code??
>
> I thought my luck was in (shims are a pain when you want to drag drop
> them on IE) - however my joy was shortlived as this only happened on
> my Win2000 PC with FF3 - on XP with both FF and IE the divs behaved as
> they have in the past - layering themselves under GE when no iFrame
> shim is applied.
>
> On this pagehttp://www.thekmz.co.uk/GEPlugin/test/shim_test4/shim_test4_odd.htm

BobJordanB

unread,
Jun 24, 2010, 7:22:36 AM6/24/10
to KML Developer Support - Getting Started with KML

Thanks Nymor

A little hard to follow your line,and yes I am using the GE and not
the Plugin.

Anyway on your hint I took the kml and swapped two of the bgcolor
bytes in the balloon style used by that icon and when viewed in GE,
all the icons using that modified style swapped their surrounding
color to pink but the color behind the text remained white.

So for completeness here are the bits (with the swapped colors):

Style:

<StyleMap id="s_Ic_D2">
<Pair><key>normal </key><styleUrl>#sn_Ic_D2</styleUrl></Pair>
<Pair><key>highlight</key><styleUrl>#sh_Ic_D2</styleUrl></Pair>
</StyleMap>
<Style id="sn_Ic_D2">
<IconStyle>
<scale>2.0</scale>
<Icon>
<href>http://jordsnet.tripod.com/images/TrapD2.png</href>
</Icon>
<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
<displayMode>default</displayMode><bgColor>fffb99ff</bgColor>
<text><![CDATA[<font face="Comic Sans MS" /><b>Trap $[name]</b><br/
><br/>$[description]]]></text>
</BalloonStyle>
<LabelStyle>
<scale>1.0</scale><color>ff00ffff</color>
</LabelStyle>
<LineStyle><color>ff00ffff</color><width>2.0</width></LineStyle>
<ListStyle>
<ItemIcon>
<href>http://jordsnet.tripod.com/images/TrapL.png</href>
</ItemIcon>
</ListStyle>
</Style>
<Style id="sh_Ic_D2">
<IconStyle>
<scale>2.2</scale>
<Icon>
<href>http://jordsnet.tripod.com/images/TrapD2.png</href>
</Icon>
<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
<displayMode>default</displayMode><bgColor>fffb99ff</bgColor>
<text><![CDATA[<font face="Comic Sans MS" /><b>Trap $[name]</b><br/
><br/>$[description]]]></text>
</BalloonStyle>
<LabelStyle>
<scale>1.0</scale><color>ff00ffff</color>
</LabelStyle>
<LineStyle><color>ff00ffff</color><width>2.0</width></LineStyle>
<ListStyle>
<ItemIcon>
<href>http://jordsnet.tripod.com/images/TrapL.png</href>
</ItemIcon>
</ListStyle>
</Style>

And an icon:

<Placemark>
<name>A105</name><description><![CDATA[Trap Type: D2<br/>Started:
Sep08<br/>No. Visits: 32<br/>Catch to date: 2Stt 4Rat ]]></
description>
<LookAt>
<longitude>175.14289</longitude><latitude>-39.14339</latitude>
<range>500</range><heading>0</heading><tilt>0</tilt>
</LookAt>
<styleUrl>#s_Ic_D2</styleUrl>
<MultiGeometry>
<Point><coordinates>175.14464,-39.14339</coordinates></Point>
<LineString><tessellate>1</tessellate>
<coordinates>175.14289,-39.14339 175.14464,-39.14339</
coordinates>
</LineString>
</MultiGeometry>
</Placemark>

And for completeness the balloon is 55mm wide, 40mm high and pink in
color
Inside is a white square 45mm wide and 30mm high containing the text:

Trap A105 (in bold font)

Trap Type: D2
Started: Sep08
No. Visits: 32
Catch to date: 2Stt 4Rat

Now where could it have inherited that white fromfrom?

The only bgcolors in the kml file are all this one color and there are
quite a few of them:

<bgColor>ff99fbff</bgColor>

plus of course the one I swapped
<bgColor>fffb99ff</bgColor>

The only color statements in the kml are in Line Style or label styles
using

<color>ff00ffff</color>
<color>8fffffff</color>
<color>00800000</color>
plus some other definitely non-white colors - all in line or label
styles

and then some bgcolor="#ffed0e" well inside html tables suitably
handled inside the CDATA constructs plus some other non-white colors.

So I am now happy there is no _white_ color definitions in my kml file

It must come from another source.

Is it possible that something I have loaded from elsewhere into My
Places could have a fragment that is overriding my styles?


I guess I am more convinced now by formally going through this
exercise that It is not something I have done

BUT I would love someone to prove me wrong

Cheers and thanks for your input.

Bob J.

Geobrowser

unread,
Jun 24, 2010, 9:22:37 PM6/24/10
to KML Developer Support - Getting Started with KML

> Is it possible that something I have loaded from elsewhere into My
> Places could have a fragment that is overriding my styles?

Don't know but that does seem to happen. I experience this
"inheritance" effect quite often. Usually a combination of flushing
the cache, re-naming/re-opening the file, and sometimes renaming the
XML ids in the KML file seems to work.

> I guess I am more convinced now by formally going through this
> exercise that It is not something I have done

There's nothing wrong with your code...I copied it and got fully pink
balloons with black comic sans text. Now your taste in aesthetics,
that we might need to discuss... ;-)

BobJordanB

unread,
Jun 29, 2010, 5:31:59 AM6/29/10
to KML Developer Support - Getting Started with KML
Thanks Geobrowser

Really appreciate you going to the trouble.

I will try those things out - inheritance - sounds a good word to
think along

And as for the colour - well the originals were <bgColor>ff99fbff</
bgColor>

which is a nice tan colour

I swapped two bytes to get <bgColor>fffb99ff</bgColor>
There was no design in terms of colour

Hey why am I defending myself :-(

But sorry to offend your senses :-(

Thanks a heap

Bob J.


BobJordanB

unread,
Jun 29, 2010, 6:37:58 AM6/29/10
to KML Developer Support - Getting Started with KML
Just to wind this up.

I tried lots of different things with little success.
clearing caches and reloading google in various orders - no effect,
still white background
Deleting all in the My places and clearing caches and reloading - no
effect
Deleting two of the more obvious preference files - no effect

Could not understand how to rename the XML ids in the KML file

Finally I deleted Google earth and downloaded the 5.2.1.1329 (beta)

That seemed to work OK backgrounds are now tan coloured.

Although the balloons are now subtly different - that's progress i
guess

Thanks to all for ideas

Bob J.
Reply all
Reply to author
Forward
0 new messages