首页 \ 问答 \ Google地球KML中的文字叠加(Text Overlay in Google Earth KML)

Google地球KML中的文字叠加(Text Overlay in Google Earth KML)

我想添加一个KML文件最后更新的日期/时间,以便在Google地球中显示为过度,无论如何可以这样做吗?

我会考虑更新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?

I would be looking at updating text in a KML file and then this being displayed in google earth.

Many Thanks.


原文:https://stackoverflow.com/questions/20844076
更新时间:2022-12-25 08:12

最满意答案

最简单的方法是使用HTML5 pattern属性

<style>
:invalid { border-color: red }
</style>
<form>
<label for=uname>Username:</label>
<input id=uname name=uname type=text pattern="XYZ.*">
<p><input type=submit value=Submit>
</form>

该示例使用CSS来指示带有红色边框的无效字段,以用于说明。

代码接受任何以XYZ(区分大小写)开头的字符串,包括字符串XYZ。 根据需要修改。

由于不普遍支持pattern属性,因此您可能希望添加执行类似检查的JavaScript代码。 在其中,使用正则表达式(如pattern属性)是最简单的方法。


The simplest way is to use the HTML5 pattern attribute:

<style>
:invalid { border-color: red }
</style>
<form>
<label for=uname>Username:</label>
<input id=uname name=uname type=text pattern="XYZ.*">
<p><input type=submit value=Submit>
</form>

The example uses CSS to indicate an invalid field with red border, for illustration.

The code accepts literally any string that starts with XYZ (case-sensitively), including the string XYZ. Modify as needed.

Since the pattern attribute is not universally supported, you probably want to add JavaScript code that performs a similar check. In it, using a regular expression, as in a pattern attribute, is the simplest approach.

相关问答

更多
  • 可以通过以下代码实现目标: function getProfile() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onr ...
  • 在将html转换为pdf时, wkhtmtopdf尚无法将pdf表单字段设置为必填字段。 由于这个限制, KnpLabs Snappy和KnpSnappyBundle不能用于根据需要设置表单字段,因为这些库使用wkhtmltopdf。 我仍然使用KnpSnappy和wkhtmltopdf,但现在使用DocuSign Tabs API创建必填字段并强制用户通过DocuSign填写表单。 wkhtmtopdf is not yet capable of setting pdf form fields as re ...
  • 您必须解析规则,然后循环解析数据以构建表单。 然后,我建议你使用部分视图来完成这个技巧。 我已经为构建自动表单和文档做了这个。 所以我在这里写了一个Laravel包: https : //github.com/Ifnot/ValidationParser 。 在我的包的示例中,您只需创建两个文件: 表单刀片视图(包含用于解析验证的代码) 字段刀片视图(用于显示表单项) You have to parse your rules, then loop on the parsed datas for buildi ...
  • 什么是连接数据库的字符串? 确保它具有指定的编码: jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncoding=UTF-8 What is your connection String to the database? Make sure it has the encoding specified on it: jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncodin ...
  • 几乎每个体面的浏览器都忽略了accept-charset属性,支持使用在Content-Type响应头的charset param中定义的表单对页面进行编码。 该属性仅在MSIE中起作用,即便如此,它使用它也是错误的 。 在Windows上运行的MSIE中,除UTF-8之外的任何其他值都将被解释为CP-1252。 不要使用此属性。 没用的。 Almost every decent browser ignores the accept-charset attribute in favour of the en ...
  • 我解决了混合django和jquery的问题(据我所知,django代码首先被'解析'):