2

I've seen that paths included in a kml file can be configured to show up only when you do a mouse-over: http://www.barnabu.co.uk/flight-route-maps-for-australia-and-new-zealand/

How can that be done?

1

Found it out myself. You have to name a StyleMap specifying a normal and highlighted state. Then make a Placemark use that StyleMap.

<Style id="sh_spider">
    <IconStyle>
        <scale>1.0</scale>
        <Icon><href>/Users/You/Icon.png</href></Icon>
    </IconStyle>
    <LabelStyle>
        <color>ffffffff</color>
        <scale>1.4</scale>
    </LabelStyle>
    <BalloonStyle>
        <text>&#36;&#91;description&#93;</text>
    </BalloonStyle>
    <LineStyle>
        <color>ffff8a6d</color>
        <width>4.4</width>
    </LineStyle>
</Style>
<Style id="sn_spider">
    <IconStyle>
        <scale>0.5</scale>
        <Icon><href>/Users/You/Icon.png</href></Icon>
    </IconStyle>
    <LabelStyle>
        <color>ffe5e5e5</color>
        <scale>0.9</scale>
    </LabelStyle>
    <BalloonStyle>
        <text>&#36;&#91;description&#93;</text>
    </BalloonStyle>
    <LineStyle>
        <color>00ff8a6d</color>
        <width>4.4</width>
    </LineStyle>
</Style>
<StyleMap id="spider"><Pair><key>normal</key><styleUrl>#sn_spider</styleUrl></Pair><Pair><key>highlight</key><styleUrl>#sh_spider</styleUrl></Pair></StyleMap>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.