Google Maps Api 在缩放后翻转 KML 图层

4
我在使用Google Maps API和KML文件时遇到了一个奇怪的问题。当我用KML初始化地图时,一切都很顺利。但是问题来了:当我将地图缩放到级别10时,KML层发生了反转。
下面是示例:

var settings,map,marker,infowindow,consultant_fname,consultant_lname,consultant_zip,consultant_city,mapOptions;
var markers = [];


$(document).ready(function(){
            mapOptions = {
    zoom: 8,
    center: new google.maps.LatLng(47.643186, 13.760376),
    scrollwheel: false,
    mapTypeControl: false,
    zoomControl: true,
    zoomControlOptions: {
     style: google.maps.ZoomControlStyle.SMALL,
     position: google.maps.ControlPosition.RIGHT_TOP
    },
    scaleControl: true,
    streetViewControl: false,
    panControl:true,
    panControlOptions : {
     position: google.maps.ControlPosition.RIGHT_TOP
    },
   };

   map = new google.maps.Map(document.getElementById('gmap'),mapOptions);
    
            var ctaLayer = new google.maps.KmlLayer('https://www.creditnet.at/austria_3.kml',{
    preserveViewport: true,
    suppressInfoWindows: true,
    map: map,
   });
   ctaLayer.setMap(map);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<div id="gmap" style="width:700px;height:700px;"></div>

希望有人能够帮助我。
敬礼, M.

请在此处提交错误报告:https://code.google.com/p/gmaps-api-issues/issues/entry?template=Maps%20API%20v3%20-%20Bug。请确保包含所有相关信息。 - Kay_N
类似的错误报告:https://code.google.com/p/gmaps-api-issues/issues/detail?id=8011 - geocodezip
1个回答

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接