function loadGeoJSON(geoJsonData, layerId, zIndex, layerColorOrStyle) {

	// Load the GeoJSON layer
	const layer = L.geoJSON(geoJsonData, {

		// Define the mapping from GeoJSON point to map feature
		pointToLayer: function(geoJsonPoint, latlng) {
			return L.circleMarker(latlng, {
				radius: 7,
				weight: 1,
				...getGeoJsonStyle(geoJsonPoint)
			});
		},

		// Define the style for the GeoJSON data
		style: function(geoJsonData) {

			// Get the provided layer style
			const layerStyle = typeof layerColorOrStyle === 'string' ?
				{ fillColor: layerColorOrStyle } :
				layerColorOrStyle;

			// Peice together the resulting style object
			const style = {
				...defaultStyle,
				...layerStyle,
				zIndex: zIndex,
				...getGeoJsonStyle(geoJsonData)
			};
			return style;
		}
	});

	// Bind tooltip to display layer
	layer.bindTooltip(`${layerId}`);

	// Bind a popup with basic information
	layer.bindPopup(function (layer) {

		// Get GeoJSON properties
		const properties = layer && layer.feature && layer.feature.properties;

		// Define the header row elements
		const headerRow = `
			<tr class="title">
				<td>
					Layer ID:
				</td>
				<td>
					${layerId}
				</td>
			</tr>
		`

		// Store popup table rows
		const tableRows = [];
		if (properties) {

			// Iterate through each object property
			for (var key in properties) {
				if (properties.hasOwnProperty(key)) {
					let value = properties[key];

					// If an object is provided, convert to string value
          if (typeof value === 'object') {
            value = JSON.stringify(value);
          }

					// Add object key-value pair to the property table
					tableRows.push(`<tr><td>${key}</td><td>${value}</td></tr>`)
				}
			}
		}

		// Return the popup table element
		return `
			<table class="property-table">
				${headerRow}
				${tableRows.join('')}
			</table>`;
	});

	// Add layer to the map
	layer.addTo(map);

	// Return a reference to the GeoJSON layer data
	return layer;
}
/**
 * Load a GeoJSON layer into the map view
 *
 * @param {*} geoJsonData - the GeoJSON data
 */
Load a GeoJSON layer into the map view
@param {*} geoJsonData - the GeoJSON data
Load a GeoJSON layer into the map view @param { * } geoJsonData - the GeoJSON data
function loadGeoJSON(geoJsonData, layerId, zIndex, layerColorOrStyle) {
	const layer = L.geoJSON(geoJsonData, {
		pointToLayer: function(geoJsonPoint, latlng) {
			return L.circleMarker(latlng, {
				radius: 7,
				weight: 1,
				...getGeoJsonStyle(geoJsonPoint)
			});
		},
		style: function(geoJsonData) {
			const layerStyle = typeof layerColorOrStyle === 'string' ?
				{ fillColor: layerColorOrStyle } :
				layerColorOrStyle;
			const style = {
				...defaultStyle,
				...layerStyle,
				zIndex: zIndex,
				...getGeoJsonStyle(geoJsonData)
			};
			return style;
		}
	});
	layer.bindTooltip(`${layerId}`);
	layer.bindPopup(function (layer) {
		const properties = layer && layer.feature && layer.feature.properties;
		const headerRow = `
			<tr class="title">
				<td>
					Layer ID:
				</td>
				<td>
					${layerId}
				</td>
			</tr>
		`
		const tableRows = [];
		if (properties) {
			for (var key in properties) {
				if (properties.hasOwnProperty(key)) {
					let value = properties[key];
          if (typeof value === 'object') {
            value = JSON.stringify(value);
          }
					tableRows.push(`<tr><td>${key}</td><td>${value}</td></tr>`)
				}
			}
		}
		return `
			<table class="property-table">
				${headerRow}
				${tableRows.join('')}
			</table>`;
	});
	layer.addTo(map);
	return layer;
}
function loadGeoJSON ( geoJsonData , layerId , zIndex , layerColorOrStyle ) { const layer = L . geoJSON ( geoJsonData , { pointToLayer : function ( geoJsonPoint , latlng ) { return L . circleMarker ( latlng , { radius : 7 , weight : 1 , ... getGeoJsonStyle ( geoJsonPoint ) } ) ; } , style : function ( geoJsonData ) { const layerStyle = typeof layerColorOrStyle === 'string' ? { fillColor : layerColorOrStyle } : layerColorOrStyle ; const style = { ... defaultStyle , ... layerStyle , zIndex : zIndex , ... getGeoJsonStyle ( geoJsonData ) } ; return style ; } } ) ; layer . bindTooltip ( ` ${ layerId } ` ) ; layer . bindPopup ( function ( layer ) { const properties = layer && layer . feature && layer . feature . properties ; const headerRow = ` ${ layerId } ` const tableRows = [ ] ; if ( properties ) { for ( var key in properties ) { if ( properties . hasOwnProperty ( key ) ) { let value = properties [ key ] ; if ( typeof value === 'object' ) { value = JSON . stringify ( value ) ; } tableRows . push ( ` ${ key } ${ value } ` ) } } } return ` ${ headerRow } ${ tableRows . join ( '' ) } ` ; } ) ; layer . addTo ( map ) ; return layer ; }
Load a GeoJSON layer into the map view
 @param {*} geoJsonData - the GeoJSON data
Load a GeoJSON layer into the map view @param { * } geoJsonData - the GeoJSON data
// Load the GeoJSON layer // Define the mapping from GeoJSON point to map feature // Define the style for the GeoJSON data // Get the provided layer style // Peice together the resulting style object // Bind tooltip to display layer // Bind a popup with basic information // Get GeoJSON properties // Define the header row elements // Store popup table rows // Iterate through each object property // If an object is provided, convert to string value // Add object key-value pair to the property table // Return the popup table element // Add layer to the map // Return a reference to the GeoJSON layer data