I do have a strange Problem with Google Maps API and a KML file.
When i initialize the Map with KML, everything works like charm. Now my problem: After zooming into the map (zoom Level 10) the KML Layer inverts.
Here is the example:
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>
Hopefully anyone can help me.
Regards M.