我正在使用我所构建的应用程序构建KML文件。现在我让它很好地在地图上画了一条线串。但是,现在我想在同一个KML文件中添加一些placemark。当尝试这样做时,它将显示行字符串或位置标记,但不会同时显示两者。
如何在KML文件中做到这一点?
我目前使用的:
<?xml version="1.0" encoding="UTF-8"?>
<kml xsi:schemaLocation="http://earth.google.com/kml/2.1 http://earth.google.com/kml2.1.xsd" xmlns="http://earth.google.com/kml/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Placemark>
<name>My Name</name>
<Style>
<LineStyle>
<color>FF0000FF</color>
<width>3.0</width>
</LineStyle>
</Style>
<LineString>
<extrude>false</extrude>
<tessellate>true</tessellate>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>A Ton of coordinates go here</coordinates>
</LineString>
</Placemark>
</kml>
我弄清楚了我必须把所有的placemark放入<Folder>
,以便有多个placemark显示,然后它工作。