我有一个谷歌地图高程服务(适用于我的宾夕法尼亚州地理学生),在谷歌的底图上点击可以正常工作。我想添加一个显示 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);
}