2

I have a KML file created from an Excel spreadsheet which contains name, lat and long. How can I display the name in Google Earth?

1

I'm not sure what app. you used to create the kml from the excel file but in simplistic terms you will need to embed a name tag within a Placemark tag to show label for each point, see example xml below (label in this example is "Untitled Placemark"):

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
    <name>test.kml</name>
    <StyleMap id="m_ylw-pushpin">
        <Pair>
            <key>normal</key>
            <styleUrl>#s_ylw-pushpin</styleUrl>
        </Pair>
        <Pair>
            <key>highlight</key>
            <styleUrl>#s_ylw-pushpin_hl</styleUrl>
        </Pair>
    </StyleMap>
    <Style id="s_ylw-pushpin">
        <IconStyle>
            <scale>1.1</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
    </Style>
    <Style id="s_ylw-pushpin_hl">
        <IconStyle>
            <scale>1.3</scale>
            <Icon>
                <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
            </Icon>
            <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
        </IconStyle>
    </Style>
    <Placemark>
        <name>Untitled Placemark</name>
        <LookAt>
            <longitude>-122.2109720652407</longitude>
            <latitude>41.31147768821823</latitude>
            <altitude>0</altitude>
            <heading>-9.207431002912404e-008</heading>
            <tilt>44.99911020701676</tilt>
            <range>176757.1969144266</range>
            <gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
        </LookAt>
        <styleUrl>#m_ylw-pushpin</styleUrl>
        <Point>
            <gx:drawOrder>1</gx:drawOrder>
            <coordinates>-122.3283130204979,41.24737300737706,0</coordinates>
        </Point>
    </Placemark>
</Document>
</kml>

You may open up the kml in a text editor to add or edit tags.

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.