function initialize() {

	// Setup map view
	map = L.map('map').setView([25, -5], 2);
	L.tileLayer(tileServer, {
		attribution: tileServerAttribution,
		maxZoom: maxZoom
	}).addTo(map);

	// Add a listener to the console logging events
	addConsoleListener(function(type, logEventContent) {

		// Get the console output content
		const content = typeof logEventContent === 'object' ?
			JSON.stringify(logEventContent, null, 2) :
			logEventContent;

		// Add output to the DOM
		consoleOutput.append(`
			<pre class="log-${type}">[${ (new Date()).toISOString()}] [${type}] ${content}</pre>
		`);
		outputLine++;

		// Scroll to the bottom of the log
		consoleOutput.scrollTop(consoleOutput.innerHeight() * outputLine);
	});

	// Store reference to message elements
	statusTextElement = $('#statusText');

	// Store reference to the source code field
	sourceCode = $('#sourceCode');

	// Store reference to the console output element
	consoleOutput = $('#consoleOutput');

	// Store reference to the input layer table body element
	inputLayerTableBody = $('#inputLayerTableBody');
}
/**
 * Initialize the map view and element references
 */
Initialize the map view and element references
Initialize the map view and element references
function initialize() {
	map = L.map('map').setView([25, -5], 2);
	L.tileLayer(tileServer, {
		attribution: tileServerAttribution,
		maxZoom: maxZoom
	}).addTo(map);
	addConsoleListener(function(type, logEventContent) {
		const content = typeof logEventContent === 'object' ?
			JSON.stringify(logEventContent, null, 2) :
			logEventContent;
		consoleOutput.append(`
			<pre class="log-${type}">[${ (new Date()).toISOString()}] [${type}] ${content}</pre>
		`);
		outputLine++;
		consoleOutput.scrollTop(consoleOutput.innerHeight() * outputLine);
	});
	statusTextElement = $('#statusText');
	sourceCode = $('#sourceCode');
	consoleOutput = $('#consoleOutput');
	inputLayerTableBody = $('#inputLayerTableBody');
}
function initialize ( ) { map = L . map ( 'map' ) . setView ( [ 25 , - 5 ] , 2 ) ; L . tileLayer ( tileServer , { attribution : tileServerAttribution , maxZoom : maxZoom } ) . addTo ( map ) ; addConsoleListener ( function ( type , logEventContent ) { const content = typeof logEventContent === 'object' ? JSON . stringify ( logEventContent , null , 2 ) : logEventContent ; consoleOutput . append ( ` ${ type } ${ ( new Date ( ) ) . toISOString ( ) } ${ type } ${ content } ` ) ; outputLine ++ ; consoleOutput . scrollTop ( consoleOutput . innerHeight ( ) * outputLine ) ; } ) ; statusTextElement = $ ( '#statusText' ) ; sourceCode = $ ( '#sourceCode' ) ; consoleOutput = $ ( '#consoleOutput' ) ; inputLayerTableBody = $ ( '#inputLayerTableBody' ) ; }
Initialize the map view and element references
Initialize the map view and element references
// Setup map view // Add a listener to the console logging events // Get the console output content // Add output to the DOM // Scroll to the bottom of the log // Store reference to message elements // Store reference to the source code field // Store reference to the console output element // Store reference to the input layer table body element