Answer the question
In order to leave comments, you need to log in
Why is google map throwing an error?
There is a script:
<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>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question