<script src="https://maps.google.com/maps/api/js?sensor=false&key=<?php echo tanim("mkey","n1",0); ?>" type="text/javascript"></script>
<!-- # maddeler alanında sıra numarası 0 olan kayıt, n1:zoom,n2+n3:koordinat // Ana Konum-->
<!-- # maddeler alanında sıra numarası 0 değilse olan kayıt, n1:Açıklama,n2+n3:koordinat-->
<?php $sqlmx=mysqli_query($conn, "select * from t1 where ne='extra' and s1=".$id." and s2=1 and s10=0"); $rsmx=mysqli_fetch_assoc($sqlmx);?>
<div id="map" class="maps" style="width:100%; min-height:350px;"></div>
<script type="text/javascript">
	var locations = [<?php foreach($coordinats as $value){?>[<?php echo $value?>],<?php }?>];
	var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: new google.maps.LatLng(41.02558,28.94007), mapTypeId: google.maps.MapTypeId.ROADMAP});
	var infowindow = new google.maps.InfoWindow();
	var marker, i;
	for (i = 0; i < locations.length; i++) { 
		marker = new google.maps.Marker({
			position: new google.maps.LatLng(locations[i][1], locations[i][2]),
			map: map
		});
		google.maps.event.addListener(marker, 'click', (function(marker, i) {
			return function() {
				infowindow.setContent(locations[i][0]);
				infowindow.open(map, marker);
			}
		})(marker, i));
	}
</script>