KML 中地标中的 href 标签未显示

问题描述

我正在创建一个包含许多 Placemarks 的地图,其中描述是以编程方式生成的。 HTML 格式有效,我使用的是 CDATA 属性,但由于某种原因 href 标签不起作用?

enter image description here

理想情况下,它显示为普通的超链接。比如,

Facebook Twitter

这是 KML 文件中的代码

<a href="https://www.facebook.com/sharer/sharer.PHP?">Facebook</a><br>

这是怎么回事..?有没有办法解决这个问题?

示例:

<Placemark>
<name>Dhaba 1376 north Indian cuisine</name>
<description><![CDATA[Address:<br>#04-64 Blk144 Upper Bukit Timah Rd,Beauty World Hawker Centre 588177<br><br>opening Hours:<br>Open everyday except Monday afternoon,11am to 10pm<br><br>Shop Recommendations:<br>Mixed Kebab Platter<br><br>Other Details:<br><br><br>Contributor:<br>OldieGoodieHawker<br><br>Share your support for this stall!:<a href="https://www.facebook.com/sharer/sharer.PHP?u=https%3A%2F%2Fhawker.help&quote=I+just+dapaoed+from+Dhaba+1376+north+Indian+cuisine+%40+%2304-64+Blk144+Upper+Bukit+Timah+Rd%2C+Beauty+World+Hawker+Centre%21+Dabao+and+help+the+digitally+disadvantaged+hawkers+near+you+today%21+Find+them+at+https%3A%2F%2Fhawker.help">Facebook</a><br><a href="https://twitter.com/intent/tweet?text=I+just+dapaoed+from+Dhaba+1376+north+Indian+cuisine+%40+%2304-64+Blk144+Upper+Bukit+Timah+Rd%2C+Beauty+World+Hawker+Centre%21+Dabao+and+help+the+digitally+disadvantaged+hawkers+near+you+today%21+Find+them+at+https%3A%2F%2Fhawker.help">Twitter</a><br><br><a href="https://www.facebook.com/sharer/sharer.PHP?u=https%3A%2F%2Fhawker.help&quote=I+just+dapaoed+from+Dhaba+1376+north+Indian+cuisine+%40+%2304-64+Blk144+Upper+Bukit+Timah+Rd%2C+Beauty+World+Hawker+Centre%21+Dabao+and+help+the+digitally+disadvantaged+hawkers+near+you+today%21+Find+them+at+https%3A%2F%2Fhawker.help.%0ABackstory%3A%0Anan">Facebook (With backstory)</a><br><a href="https://twitter.com/intent/tweet?text=I+just+dapaoed+from+Dhaba+1376+north+Indian+cuisine+%40+%2304-64+Blk144+Upper+Bukit+Timah+Rd%2C+Beauty+World+Hawker+Centre%21+Dabao+and+help+the+digitally+disadvantaged+hawkers+near+you+today%21+Find+them+at+https%3A%2F%2Fhawker.help.%0ABackstory%3A%0Anan">Twitter (With backstory)</a><br>]]></description>
<styleUrl>#icon-1577-E65100</styleUrl>
<Point><coordinates>103.7761346,1.3424354,0</coordinates></Point>
</Placemark>

解决方法

您的 global.jQuery = require('jquery'); 中有拼写错误(网址上缺少结束语)

<Placemark>

应该是:

<a href="https://www.facebook.com/sharer/sharer.php>Facebook</a>

这个:

<a href="https://www.facebook.com/sharer/sharer.php">Facebook</a>

应该是:

<Placemark>
<name>sample point</name>
<description><![CDATA[Address:<br>
this is the address<br><br>
Opening Hours:<br>
Mon-Sat,5.30am-1.30pm<br><br>
Other Details:<br>
blabbiltiy blabbity bla<br>
Share your support for this stall!:
<a href="https://www.facebook.com/sharer/sharer.php>Facebook</a>]]></description>
<styleUrl>#icon-1577-E65100</styleUrl>
<Point><coordinates>103.8578165,1.306714,0</coordinates></Point>
</Placemark>

proof of concept

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...