<div class="mapcenter" align="center">
	<div id="routemap" style="width: 100%; height: 520px;"></div>
</div>

<script src="<?php echo SITE_URL?>/lib/js/base_map.js"></script>
<script type="text/javascript">

const map = createMap({
	zoom: 5,
	render_elem: 'routemap',
	provider: '<?php echo Config::Get("MAP_TYPE"); ?>',
});

<?php 
	
	foreach($data as $aircraft) {
		?>
			const aircraft_<?php echo $aircraft->acregistration; ?> = L.latLng(<?php echo $aircraft->arrlat?>, <?php echo $aircraft->arrlng?>);
				
				selArrMarker = L.marker(aircraft_<?php echo $aircraft->acregistration; ?>).bindPopup("<?php echo "$aircraft->acregistration is at $aircraft->arrname ($aircraft->arricao)"; ?>").addTo(map);
				
		<?php
	}

?>

</script>

