gpt4 book ai didi

每个航路点上的 KML 图标

转载 作者:行者123 更新时间:2023-12-02 17:22:02 29 4
gpt4 key购买 nike

我想将我们数据库中的电线杆和电缆导出到 Google 地球的 KML 文件中。

对于每个节点,我们都有一个极阵列,电缆始终连接到阵列中的下一个极。

制作简单路径的导出似乎很容易。但是这些路径只是显示一条路径,它们并没有显示每个航路点(电线杆)。

这是我想在 .kml 中实现的 Google map 示例 screenshot from Google Maps

最佳答案

如果您想要每个极点的路径和点(也称为航路点),那么您需要 KML 不仅包括每个极点位置的线段分隔点。

您的 KML 需要像这样构造,其中 poleSyle 将有一个 IconStyle使用您想要的点和 lineStyle 图标将是一条粗绿线

<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="poleStyle">
...
</Style>
<Style id="lineStyle">
...
</Style>
<Placemark>
<styleUrl>#lineStyle</styleUrl>
<LineString>
<coordinates>...</coordinates>
</LineString>
</Placemark>
<Placemark>
<name>pole1</name>
<description>address pole1</description>
<styleUrl>#poleStyle</styleUrl>
<Point>
<coordinates>...</coordinates>
</Point>
</Placemark>
...
</Document>
</kml>

如果您不想或不需要每个点的唯一名称或描述,那么您可以将这些点合并到 MultiGeometry 内的单个地标中。像这样:

<Placemark>
<styleUrl>#poleStyle</styleUrl>
<MultiGeometry>
<Point>
<coordinates>...</coordinates>
</Point>
<Point>
<coordinates>...</coordinates>
</Point>
</MultiGeometry>
</Placemark>

关于每个航路点上的 KML 图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41918377/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com