我需要将坐标从 C++ 文件输入到 KML 文件中才能与 Google Earth 一起运行,您将如何执行此操作?KML 文件是:
<?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>Path.kml</name>
<Style id="pathstyle">
<LineStyle>
<color>ff190cff</color>
<width>2</width>
</LineStyle>
</Style>
<Placemark>
<name>Path</name>
<description>This is the path between the 2 points</description>
<styleUrl>#pathstyle</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
long1,lat1,0
long2,lat2,0
</coordinates>
</LineString>
</Placemark>
Run Code Online (Sandbox Code Playgroud)
当输入纬度和经度时,如何从c++文件中输入数据?它们被声明为双浮点数