Google Earth KML中的文本重叠 [英] Text Overlay in Google Earth KML
问题描述
我想添加一个日期/时间,KML文件上次更新,以在Google地球中显示为空白,是否可以完成?
I would like to add a date/time that the KML file was last updated to be displayed as an overaly in Google Earth, is there anyway this could be done?
我将在KML文件中查看更新文本,然后显示在google earth中。
I would be looking at updating text in a KML file and then this being displayed in google earth.
非常感谢。
推荐答案
href =https://developers.google.com/chart/image/docs/gallery/dynamic_icons =nofollow> Google图表API 可以从文本动态创建图像,并将其用作屏幕叠加图像
One trick is using the Google Chart API to dynamically create images from text and using that as a screen overlay image in Google Earth.
示例:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<ScreenOverlay>
<Icon>
<href><![CDATA[http://chart.apis.google.com/chart?chst=d_text_outline&chld=FFBBBB|16|h|BB0000|b|Hello%20Word]]></href>
</Icon>
<overlayXY x="0.8" xunits="fraction" y="0.8" yunits="fraction"/>
<screenXY x="0.8" xunits="fraction" y="0.8" yunits="fraction"/>
</ScreenOverlay>
</kml>
Paleoglobe KML中使用了嵌入图像的屏幕叠加:
http://www.geology.sdsu.edu/kmlgeology/kmz/paleoglobe/paleogeography.kmz
A screen overlay with embedded images is used in the Paleoglobe KML: http://www.geology.sdsu.edu/kmlgeology/kmz/paleoglobe/paleogeography.kmz
有许多网站可以在您嵌入KMZ文件并从KML引用的标签上创建标签文字。
There are many websites that create images out of text for labels which you embed in a KMZ file and refer to from you KML.
此外,如果您希望文本在固定位置显示为地面上的标签,那么您可以使用GroundOverlay使用相同的技巧,或者只需创建一个名称(即显示在映射在该位置)和一个风格抑制图标。
Also, if you want text to appear as a label on the ground at a fixed location then you can use same trick with a GroundOverlay or simply create a Placemark with a name (which is shown on map at that location) and a Style suppressing the icon.
这篇关于Google Earth KML中的文本重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!