Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function initTangram(pathToSceneFile, sceneBasePath) {
// Add Tangram Layer
tangramLayer = Tangram.leafletLayer({
scene: pathToSceneFile,
sceneBasePath,
events: {
hover: handleInspectionHoverEvent,
click: handleInspectionClickEvent,
},
});
tangramLayer.addTo(map);
tangramLayer.scene.subscribe({
load(event) {
// Modify the scene config object here. This mutates the original scene
// config object directly and will not be returned. Tangram does not expect
// the object to be passed back, and will render with the mutated object.
// eslint-disable-next-line no-param-reassign