我的KML文件:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="cafeIcon">
<IconStyle>
<Icon>
<href>http://beta-gmapsapi.esy.es/images/markers/cafe.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name>Test marker</name>
<description>Description for test marker</description>
<styleUrl>#cafeIcon</styleUrl>
<Point>
<coordinates>30.46633243560791,50.44826825956681,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
这里我连接了我的KML文件
function loadKmlLayer(map) {
var kmlLayer = new google.maps.KmlLayer({
url: 'http://beta-gmapsapi.esy.es/kml/test.kml',
suppressInfoWindows: false,
preserveViewport: true,
map: map
});
}
但保存后我看到标准的google标记.. Everything works, but icon doesn't change
也许这里有一些语法问题?
答案 0 :(得分:0)
感谢geocodezip
这是服务器的问题。显示结果花了很长时间..