function addLocationsToPanel(locations) {
		var nodeOL = document.createElement('ul'),
			i;

		nodeOL.style.fontSize = 'small';
		nodeOL.style.marginLeft = '5%';
		nodeOL.style.marginRight = '5%';

		for (i = 0; i < locations.length; i += 1) {
			let location = locations[i];
			var li = document.createElement('li'),
				divLabel = document.createElement('div'),
				address = location.address,
				content =
					'<strong style="font-size: large;">' +
					address.label +
					'</strong></br>';
			position = location.position;

			content +=
				'<strong>houseNumber:</strong> ' + address.houseNumber + '<br/>';
			content += '<strong>street:</strong> ' + address.street + '<br/>';
			content += '<strong>district:</strong> ' + address.district + '<br/>';
			content += '<strong>city:</strong> ' + address.city + '<br/>';
			content += '<strong>postalCode:</strong> ' + address.postalCode + '<br/>';
			content += '<strong>county:</strong> ' + address.county + '<br/>';
			content += '<strong>country:</strong> ' + address.countryName + '<br/>';
			content +=
				'<strong>position:</strong> ' +
				Math.abs(position.lat.toFixed(4)) +
				(position.lat > 0 ? 'N' : 'S') +
				' ' +
				Math.abs(position.lng.toFixed(4)) +
				(position.lng > 0 ? 'E' : 'W') +
				'<br/>';

			divLabel.innerHTML = content;
			li.appendChild(divLabel);

			nodeOL.appendChild(li);
		}

		$('#outputDirections').append(nodeOL);
	}
// Function to add locations to the panel
Function to add locations to the panel
Function to add locations to the panel
function addLocationsToPanel(locations) {
		var nodeOL = document.createElement('ul'),
			i;
		nodeOL.style.fontSize = 'small';
		nodeOL.style.marginLeft = '5%';
		nodeOL.style.marginRight = '5%';
		for (i = 0; i < locations.length; i += 1) {
			let location = locations[i];
			var li = document.createElement('li'),
				divLabel = document.createElement('div'),
				address = location.address,
				content =
					'<strong style="font-size: large;">' +
					address.label +
					'</strong></br>';
			position = location.position;
			content +=
				'<strong>houseNumber:</strong> ' + address.houseNumber + '<br/>';
			content += '<strong>street:</strong> ' + address.street + '<br/>';
			content += '<strong>district:</strong> ' + address.district + '<br/>';
			content += '<strong>city:</strong> ' + address.city + '<br/>';
			content += '<strong>postalCode:</strong> ' + address.postalCode + '<br/>';
			content += '<strong>county:</strong> ' + address.county + '<br/>';
			content += '<strong>country:</strong> ' + address.countryName + '<br/>';
			content +=
				'<strong>position:</strong> ' +
				Math.abs(position.lat.toFixed(4)) +
				(position.lat > 0 ? 'N' : 'S') +
				' ' +
				Math.abs(position.lng.toFixed(4)) +
				(position.lng > 0 ? 'E' : 'W') +
				'<br/>';
			divLabel.innerHTML = content;
			li.appendChild(divLabel);
			nodeOL.appendChild(li);
		}
		$('#outputDirections').append(nodeOL);
	}
function addLocationsToPanel ( locations ) { var nodeOL = document . createElement ( 'ul' ) , i ; nodeOL . style . fontSize = 'small' ; nodeOL . style . marginLeft = '5%' ; nodeOL . style . marginRight = '5%' ; for ( i = 0 ; i < locations . length ; i += 1 ) { let location = locations [ i ] ; var li = document . createElement ( 'li' ) , divLabel = document . createElement ( 'div' ) , address = location . address , content = '<strong style="font-size: large;">' + address . label + '</strong></br>' ; position = location . position ; content += '<strong>houseNumber:</strong> ' + address . houseNumber + '<br/>' ; content += '<strong>street:</strong> ' + address . street + '<br/>' ; content += '<strong>district:</strong> ' + address . district + '<br/>' ; content += '<strong>city:</strong> ' + address . city + '<br/>' ; content += '<strong>postalCode:</strong> ' + address . postalCode + '<br/>' ; content += '<strong>county:</strong> ' + address . county + '<br/>' ; content += '<strong>country:</strong> ' + address . countryName + '<br/>' ; content += '<strong>position:</strong> ' + Math . abs ( position . lat . toFixed ( 4 ) ) + ( position . lat > 0 ? 'N' : 'S' ) + ' ' + Math . abs ( position . lng . toFixed ( 4 ) ) + ( position . lng > 0 ? 'E' : 'W' ) + '<br/>' ; divLabel . innerHTML = content ; li . appendChild ( divLabel ) ; nodeOL . appendChild ( li ) ; } $ ( '#outputDirections' ) . append ( nodeOL ) ; }
Function to add locations to the panel
Function to add locations to the panel