Есть скрипт:
<script>
var locations = [
<?php foreach($mapdata as $maping){ ?>
{lat:<?=$maping['lat'];?>, lng: <?=$maping['lng'];?>, type:<?=$maping['category_id']?>},
<?php } ?>
];
var descrip = <?=json_encode($mapdata)?>;
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: {lat: 50.427646, lng: 30.539380}
});
}
</script>
И после него следует сразу:
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=MyKEY&callback=initMap"></script>
<script defer src="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js"></script>
Но выводит ошибку в консоле: