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