From Google Earth I fetch my KML file from - say - address http://myaddress.com:8080
In the KML file I have several styles defined with an HREF for each icon. In this HREF I have the name of the icon, and I expect that Google Earth would implicitly fetch this file from the same server address, i.e. at http://myaddress.com:8080/aircraft.png in the example, unless another address is specified.
Appearent this does not work. I suppose it is interpreted as a local file.
I am now forced to tell my KML server on which address it is advertising itself, and use that address to create an absolute HREF for each icon in each KML file it produces.
How can I prevent using the server address in the KML for HREF-ed icons?
Example KML file:
<?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>