來自Google地球我從 - say地址獲取我的KML文件http://myaddress.com:8080KML HREF必須始終是絕對的?
在KML文件中,我爲每個圖標定義了HREF的幾種樣式。 在這個HREF中,我有這個圖標的名稱,我希望Google地球會隱式地從同一個服務器地址獲取這個文件,例如在本例中的http://myaddress.com:8080/aircraft.png,除非指定了另一個地址。
顯然這不起作用。我想它被解釋爲一個本地文件。
我現在不得不告訴我的KML服務器自己在哪個地址上做廣告,並使用該地址爲其生成的每個KML文件中的每個圖標創建一個絕對HREF。
如何防止在KML中爲HREF-ed圖標使用服務器地址?
示例KML文件:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
<Document>
<name>GE View</name>
<open>1</open>
<Style id="style8">
<IconStyle>
<scale>1.0</scale>
<heading>0.0</heading>
<Icon>
<href>aircraft.png</href>
<refreshInterval>0.0</refreshInterval>
<viewRefreshTime>0.0</viewRefreshTime>
<viewBoundScale>0.0</viewBoundScale>
</Icon>
</IconStyle>
</Style>
<Folder>
<name>Entities</name>
<open>1</open>
<Placemark>
<name>HLAobjectRoot.BaseEntity.PhysicalEntity.Platform.Aircraft101</name>
<visibility>1</visibility>
<open>0</open>
<description>HLAobjectRoot.BaseEntity.PhysicalEntity.Platform.Aircraft101: EntityType=1.2.0.-103.57.0.0</description>
<styleUrl>style8</styleUrl>
<Point>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-18.00000000000001,53.999999999219824,1000.0000635553151</coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml>