我有一个谷歌地图升级服务(对于我的宾夕法尼亚州地理学生),只需点击谷歌的底图即可正常工作。我想添加一个显示PA县的kml图层。当我添加它时,不再显示高程信息窗口。有没有办法添加kml但抑制其点击响应,以便高程响应显示?
当前代码(部分):
function initialize() {
var mapOptions = {
zoom: 7,
center: centerOfPA,
mapTypeId: 'roadmap'
}
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
var paCounties = new google.maps.KmlLayer('http://mapmaker.millersville.edu/arcgis/services/PAcounties/MapServer/KmlServer', {suppressInfoWindows: true});
paCounties.setMap(map);
// Create an ElevationService
elevator = new google.maps.ElevationService();
// Add a listener for the click event and call getElevation on that location
google.maps.event.addListener(map, 'click', getElevation);
}