Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to change Lable Color of KML Placemarks ?

  1. #1
    Unregistered Kain
    Guest

    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

  2. #2
    Senior Member
    Join Date
    Apr 2006
    Posts
    401

    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

  3. #3
    Super Member James_In_Utah's Avatar
    Join Date
    Jan 2006
    Location
    Eden, Utah
    Posts
    1,790

    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>

  4. #4
    Unregistered Kain
    Guest

    Default

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

    Regards,
    Kain :-))

  5. #5
    Unregistered Kain
    Guest

    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

  6. #6
    Super Member James_In_Utah's Avatar
    Join Date
    Jan 2006
    Location
    Eden, Utah
    Posts
    1,790

    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

  7. #7
    Sam Dutton
    Guest

    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.

  8. #8
    Bored Explorer m_k's Avatar
    Join Date
    Nov 2004
    Location
    Warsaw, Poland
    Posts
    1,796

    Default

    Three numbers for RGB and four for ARGB (RGB + alpha channel)

  9. #9
    eknath.bits@gmail.com
    Guest

    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.

  10. #10
    Super Member James_In_Utah's Avatar
    Join Date
    Jan 2006
    Location
    Eden, Utah
    Posts
    1,790

    Default

    Best bet is to try a google maps forum...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Render Priority for imported KML placemarks?
    By James_In_Utah in forum Developers' Corner
    Replies: 2
    Last Post: 01-30-2008, 06:54 AM
  2. zoom and latitude change
    By haddazi in forum Development Help
    Replies: 1
    Last Post: 11-14-2007, 05:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •