Hello. I'm trying to host KML files with PA service. I have html file with script.
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 12,
center: {lat: 49.61, lng: 32.19} // Adjust as necessary
});
var ctaLayer = new google.maps.KmlLayer({
url: 'https://asvirid.name/kml/Crops_2023.kml',
map: map,
preserveViewport: false, // Adjust the viewport to the KML layer
suppressInfoWindows: false // Allows default info windows on click
});
ctaLayer.addListener('status_changed', function() {
console.log('KML Layer status:', ctaLayer.getStatus());
});
}
</script>
And this worked for me for like 4 or 5 years, but now I get an error
KML Layer status: FETCH_ERROR
When I host my KML file on google drive or any another server it works fine. But some how script cant access to my static folder anymore. Is here any solution how can it and find problem?