World Wind Forums

Go Back   World Wind Forums > WorldWind Development (Other) > Add-on & Script Development

Add-on & Script Development Creating add-ons and scripts for World Wind.

Reply
 
Thread Tools Display Modes
Old 02-13-2008, 01:11 AM   #1
Unregistered Kain
Guest
 
Posts: n/a
Default How to change Lable Color of KML Placemarks ?

Hi,

all KML-Placemark descriptions show up with white color. This is difficult to read in some areas. Is there a way to change this, e.g. to red ?

Also all placemarks show up with the same icons. Any way to display different icons ??

WW doesn't seem to be able to interpret KML 2.1 style-tags - right ?

Thank you very much for any help on this !!!

Regards,
Kain
  Reply With Quote
Old 02-13-2008, 01:23 AM   #2
Chade
Senior Member
 
Join Date: Apr 2006
Posts: 407
Chade is an unknown quantity at this point
Default

Code:
<Style>
  <PolyStyle>
    <color>7f00ffff</color>
    <colorMode>normal</colorMode>
    <fill>1</fill>
  </PolyStyle>
</Style>
Not sure about changing the icon. I don't think I was able to, last time I was playing with it.
__________________
Machine. Unexpectedly, I’d invented a time
- Alan Moore
Chade is offline   Reply With Quote
Old 02-13-2008, 05:03 AM   #3
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

Here's a sample KML snippet loading an icon, and using a styleurl:


<Style id="green_site">
<IconStyle>
<color>ff00f00f</color>
<scale>.500</scale>
<Icon>
<href>icons/low.png</href>
</Icon>
</IconStyle>
<LineStyle>
<color>73ffffff</color>
<width>3.5</width>
</LineStyle>
<LabelStyle>
<scale>0.57</scale>
</LabelStyle>
</Style>
<Folder>

<Placemark>
<name>QXR</name>
<description>
<![CDATA[
<b>Name: Russellville, AR
]]>
</description>
<styleUrl>green_site</styleUrl>
<Point>
<extrude>0</extrude>
<altitudeMode>absolute</altitudeMode>
<coordinates>-92.9, 35.4, 1854.5</coordinates>
</Point>
<Style>
<IconStyle>
<heading>0</heading>
</IconStyle>
</Style>
</Placemark>
James_In_Utah is offline   Reply With Quote
Old 02-14-2008, 12:41 AM   #4
Unregistered Kain
Guest
 
Posts: n/a
Default

Thank you veeery much for your quick responses !
That looks good and will hopefully work. I will try it later.

Regards,
Kain :-))
  Reply With Quote
Old 02-14-2008, 12:15 PM   #5
Unregistered Kain
Guest
 
Posts: n/a
Default

Thank you so much !!

I am now able to change icons - but changes in LableStyle do not seem to affect Lables in WW. All Lables show up in same color (white), font and size.

Here is my KML style definition:

<Style id="randomLabelColor">
<IconStyle>
<color>ff0000ff</color>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/gas_stations.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
<LabelStyle>
<color>ff0000ff</color>
<colorMode>normal</colorMode>
<scale>1</scale>
</LabelStyle>
</Style>


Is there anything wrong ??

Thanks,
Kain
  Reply With Quote
Old 02-14-2008, 04:04 PM   #6
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

At least the scale works on the Icon. I don't think the style for the labels are even parsed. Extrude line width doesn't seem to do anything either.
James
James_In_Utah is offline   Reply With Quote
Old 10-28-2008, 11:47 AM   #7
Sam Dutton
Guest
 
Posts: n/a
Default color looks wrong

A belated reply...

<color>ff0000ff</color>

This looks wrong to me: color should consist of three hex numbers (shouldn't they?), i.e. six characters, e.g. ff00ff.
  Reply With Quote
Old 10-29-2008, 05:44 PM   #8
m_k
Bored Explorer
 
m_k's Avatar
 
Join Date: Nov 2004
Location: Warsaw, Poland
Posts: 1,808
m_k is an unknown quantity at this point
Default

Three numbers for RGB and four for ARGB (RGB + alpha channel)
__________________
Hot stuff: FAQ, forum search, DirectX, .NET, Video Card Compatibility list
m_k is offline   Reply With Quote
Old 05-11-2011, 05:09 PM   #9
eknath.bits@gmail.com
Guest
 
Posts: n/a
Default Not able to change the Balloon color

Hi friends,

I tried importing a kml file into Google Maps - it is successful but the balloon color I wanted was yellow on the map, whereas it does not show anything at all. If I remove the styleUrl, it shows the blue balloon (i think it is the default balloon that the map picks up.)

Following is the code in my kml file -

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<Style id="SOME"><IconStyle><scale>0.8</scale><Icon> <href>http://icons.99k.org/pink-stars.png</href> </Icon></IconStyle></Style>
<Style id="UNK"><IconStyle><scale>0.8</scale><Icon> <href>http://icons.99k.org/wht-blank.png</href> </Icon></IconStyle></Style>
<Style id="NO"><IconStyle><scale>0.8</scale><Icon> <href>http://icons.99k.org/ylw-circle.png</href> </Icon></IconStyle></Style>
<Placemark>
<name>24 hour Fitness</name>
<description> Location : San Ramon, CA </description>
<styleUrl>#NO</styleUrl>
<Point>
<coordinates>-121.967299,37.776864</coordinates>
</Point>
</Placemark>
</Document>
</kml>


Can anyone please tell me if I am missing something here and what is the way forward to get say a yellow balloon ?

Thanks & Rgds.
  Reply With Quote
Old 05-19-2011, 02:12 PM   #10
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

Best bet is to try a google maps forum...
James_In_Utah is offline   Reply With Quote
Reply

Tags
punaise


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WW1.3.2-Plugin: Layer Edit canosso Add-ons & Scripts 21 02-27-2010 04:37 AM
Render Priority for imported KML placemarks? James_In_Utah Developers' Corner 2 01-30-2008 05:54 AM
zoom and latitude change haddazi Development Help 1 11-14-2007 04:04 AM
WW 1.3.2-Plugin: Skripter canosso Add-ons & Scripts 33 03-22-2007 02:06 PM


All times are GMT +1. The time now is 01:16 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.