我想将数据从“我的地图”导出到KML文件以在其他地方使用,但是,它缺少PlaceMarker所需的Point数据。似乎应该有一种方法来包含它,因为点击一个点会在描述下面显示纬度和经度,但是我有很多点并且不想对每个点进行硬编码。我在下面提供了我正在讨论的示例代码。
<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://www.opengis.net/kml/2.2'>
<Document>
<name>Test</name>
<description><![CDATA[]]></description>
<Folder>
<name>address.xlsx</name>
<Placemark>
<name>Buffet</name>
<description><![CDATA[First: Jimmy<br>Address: Somewhere on the Beach<br>City: Key West<br>State: FL<br>ZIP: 33040]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>Jimmy</value>
</Data>
<Data name='Address'>
<value>Somewhere on the Beach</value>
</Data>
<Data name='City'>
<value>Key West</value>
</Data>
<Data name='State'>
<value>FL</value>
</Data>
<Data name='ZIP'>
<value>33040</value>
</Data>
</ExtendedData>
<address>Somewhere on the Beach Key West FL 33040</address>
</Placemark>
<Placemark>
<name>Bush</name>
<description><![CDATA[First: George<br>Address: 1600 Pennsylvania Ave<br>City: Washington<br>State: DC<br>ZIP: 20500]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>George</value>
</Data>
<Data name='Address'>
<value>1600 Pennsylvania Ave</value>
</Data>
<Data name='City'>
<value>Washington</value>
</Data>
<Data name='State'>
<value>DC</value>
</Data>
<Data name='ZIP'>
<value>20500</value>
</Data>
</ExtendedData>
<address>1600 Pennsylvania Ave Washington DC 20500</address>
</Placemark>
<Placemark>
<name>Crockett</name>
<description><![CDATA[First: Davey<br>Address: The Alamo<br>City: San Antonio<br>State: TX<br>ZIP: 78210]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>Davey</value>
</Data>
<Data name='Address'>
<value>The Alamo</value>
</Data>
<Data name='City'>
<value>San Antonio</value>
</Data>
<Data name='State'>
<value>TX</value>
</Data>
<Data name='ZIP'>
<value>78210</value>
</Data>
</ExtendedData>
<address>The Alamo San Antonio TX 78210</address>
</Placemark>
<Placemark>
<name>Gates</name>
<description><![CDATA[First: Bill<br>Address: 1 Microsoft Way<br>City: Redmond<br>State: WA<br>ZIP: 98052]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>Bill</value>
</Data>
<Data name='Address'>
<value>1 Microsoft Way</value>
</Data>
<Data name='City'>
<value>Redmond</value>
</Data>
<Data name='State'>
<value>WA</value>
</Data>
<Data name='ZIP'>
<value>98052</value>
</Data>
</ExtendedData>
<address>1 Microsoft Way Redmond WA 98052</address>
</Placemark>
<Placemark>
<name>Kong</name>
<description><![CDATA[First: King<br>Address: Empire State Building<br>City: New York<br>State: NY<br>ZIP: 10118]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>King</value>
</Data>
<Data name='Address'>
<value>Empire State Building</value>
</Data>
<Data name='City'>
<value>New York</value>
</Data>
<Data name='State'>
<value>NY</value>
</Data>
<Data name='ZIP'>
<value>10118</value>
</Data>
</ExtendedData>
<address>Empire State Building New York NY 10118</address>
</Placemark>
<Placemark>
<name>Rockne</name>
<description><![CDATA[First: Knute<br>Address: 146 Keenan Hall<br>City: Notre Dame<br>State: IN<br>ZIP: 46556]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>Knute</value>
</Data>
<Data name='Address'>
<value>146 Keenan Hall</value>
</Data>
<Data name='City'>
<value>Notre Dame</value>
</Data>
<Data name='State'>
<value>IN</value>
</Data>
<Data name='ZIP'>
<value>46556</value>
</Data>
</ExtendedData>
<address>146 Keenan Hall Notre Dame IN 46556</address>
</Placemark>
<Placemark>
<name>Simpson</name>
<description><![CDATA[First: Homer<br>Address: 742 Evergreen Terrace<br>City: Springfield<br>State: US<br>ZIP: 12345]]></description>
<styleUrl>#icon-503-DB4436</styleUrl>
<ExtendedData>
<Data name='First'>
<value>Homer</value>
</Data>
<Data name='Address'>
<value>742 Evergreen Terrace</value>
</Data>
<Data name='City'>
<value>Springfield</value>
</Data>
<Data name='State'>
<value>US</value>
</Data>
<Data name='ZIP'>
<value>12345</value>
</Data>
</ExtendedData>
<address>742 Evergreen Terrace Springfield US 12345</address>
</Placemark>
</Folder>
<Style id='icon-503-DB4436-normal'>
<IconStyle>
<color>ff3644DB</color>
<scale>1.1</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png</href>
</Icon>
<hotSpot x='16' y='31' xunits='pixels' yunits='insetPixels'>
</hotSpot>
</IconStyle>
<LabelStyle>
<scale>0.0</scale>
</LabelStyle>
</Style>
<Style id='icon-503-DB4436-highlight'>
<IconStyle>
<color>ff3644DB</color>
<scale>1.1</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png</href>
</Icon>
<hotSpot x='16' y='31' xunits='pixels' yunits='insetPixels'>
</hotSpot>
</IconStyle>
<LabelStyle>
<scale>1.1</scale>
</LabelStyle>
</Style>
<StyleMap id='icon-503-DB4436'>
<Pair>
<key>normal</key>
<styleUrl>#icon-503-DB4436-normal</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#icon-503-DB4436-highlight</styleUrl>
</Pair>
</StyleMap>
</Document>
</kml>
You can see in this photo the latitude and longitude displayed to the bottom left of the description