kml文件中没有显示任何内容

时间:2013-03-15 16:09:21

标签: xml kml

我有以下kml文件但由于某种原因没有显示任何内容。

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Name>route</Name>
    <Placemark>
      <Linestring>
        <coordinates>14.5061117878199,35.8990365284545 14.5058167878199,35.8988670284544 14.5058167878199,35.8988670284544 14.5056558878199,35.8986975284544 14.5055646878199,35.8985889284545 14.5055109878199,35.8984238284544 14.5055163878199,35.8982543284544 14.5066562791164,35.8947140342037 14.5080133654525,35.895601956291 14.508068577642,35.895789456493 14.508202677642,35.895859056493 14.508374277642,35.895867756493 14.5085480700319,35.895743910548 14.5095892187563,35.8963904057043 14.5097121366401,35.8964673008673 14.5099171033588,35.8965955242694 14.510177777549,35.8967585972391 14.5102952126176,35.8968320624539 14.5105811353316,35.8965219258386 14.5106740188636,35.89642697518 14.5113605685456,35.8968622167023 14.5117147886365,35.8964875258677 14.5121309325049,35.8960473326169 14.5124913761678,35.8956660585436 14.512196695274,35.8954626335993 14.5118252855419,35.8952732535598 14.5123172,35.8948561 14.5119631,35.8943868 14.5125328991464,35.8939939330881 14.5122582,35.8937675 14.5120731,35.8936502 14.511888,35.8935589 14.5117351,35.8934981 14.5111936945862,35.8932897590689 14.5111102,35.8932439 14.510166,35.8926224 14.5100588,35.8925529 14.5100051885259,35.8924930260251 14.5099247,35.8923877 14.5095384,35.8914317 14.5094732358671,35.8913470355122 14.5094088414534,35.8912696267139 14.5093444414534,35.8912088267139 14.5092237960692,35.8911561036586 14.5091602101316,35.890886091117 14.5086586,35.8905972 14.5084548,35.8904756 14.5082724,35.8903626 14.5079935,35.8901366 14.5077789,35.8899367 14.5075321,35.8896064 14.5072424,35.8891718 14.5067302817904,35.8883782588094 14.5065451887012,35.8882243887012 </coordinates>
      </Linestring>
    </Placemark>
  </Document>
</kml>

任何想法可能是什么原因?

1 个答案:

答案 0 :(得分:1)

XML(以及KML作为它的方言)区分大小写。 &lt; Linestring>不是KML标记。正确的标记为<LineString>

KML reference

fixed KML on Google Maps

在Google Maps API v3地图上修复了KML: http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/SO_emptyKMLa.xml