自从从 google.maps.KmlLayer 移动到 geoxml3 后,我现在在每个信息窗口底部的新行上都有“到这里”和“从这里”链接。我该如何摆脱这些?
在我发布了上面的原始问题之后,我发现这发生在 kmz 分支而不是 polys 分支上。我需要 kmz 分支来处理带有阴影的标记,这些标记要么宽于 32 像素,要么偏离中心。
我可能已经超出了我的深度,但是查看KMZ 源,如果该地标有一个 latlng(即每个地标),kmz/geoxml3 似乎总是会添加 Directions 行。
因此,除非有 infoWindowOption 或我没有看到的东西,否则我想我所能做的就是破解加载 geDirections 的代码,大约在 1206-1215 行。但是有什么方法可以在不破解 kmz/geoxml3 的情况下抑制这条线?
当前地图位于http://allbluesdance.com/bluesmapgeoxml3_005.php,代码(已删除文本样式)为:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
#page-body { height: 100%; margin: 0; padding: 0; }
#map-canvas {
height: 100%;
}
</style>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDDFrP7MSD1ieFEvaF95BRlwHa0S72Fy1s&sensor=FALSE">
</script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://geoxml3.googlecode.com/svn/branches/kmz/geoxml3.js"></script>
<script src="http://geoxml3.googlecode.com/svn/trunk/ProjectedOverlay.js"></script>
<script>
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(20,-100),
zoom: 2,
preserveViewport: true
};
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
var blues = new geoXML3.parser({map: map, singleInfoWindow: true, zoom: false});
blues.parse('http://allbluesdance.com/allbluesdance_003.kml');
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body id="page-body">
<div id="map-canvas"/>
</body>
</html>
KML 文件为:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Blues Dance Cities</name>
<description><![CDATA[]]></description>
<Style id="style1">
<IconStyle>
<Icon>
<href>http://allbluesdance.com/bluemarkershadow_49x32.png</href>
<scale>1.0</scale>
</Icon>
<hotSpot x="24" y="0" xunits="pixels" yunits="pixels" />
</IconStyle>
</Style>
<Placemark>
<name>Argentina</name>
<description>
<![CDATA[<h6>Blues Playground <a href="http://www.bluesplayground.blogspot.com/" target="_blank">Site</a>,
<a href="https://www.facebook.com/groups/225196297497142/" target="_blank">Group</a></h6>
]]>
</description>
<styleUrl>#style1</styleUrl>
<Point>
<coordinates>-58.38159310000003,-34.6037232,0.0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Australia & New Zealand</name>
<description>
<![CDATA[<h6><a href="https://www.facebook.com/groups/369022273182480/" target="_blank">Blues Dancers ANZ</h6>
<h6><a href="https://www.facebook.com/groups/1437271016490252/" target="_blank">Blues, Fusion & Alt-Blues Dancing<br>
 (Australia & NZ)</h6>
]]>
</description>
<styleUrl>#style1</styleUrl>
<Point>
<coordinates>162.5,-37,0.0</coordinates>
</Point>
</Placemark>
.
.
.
谢谢,德鲁