Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Goinging authored Nov 19, 2023
1 parent f09e034 commit e4925f8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,33 @@ fetch('data/classified.geojson')
if (feature.properties.Class_name === 'Tree/Leaves') {
popupContent = `<div>
<h3>Leaves</h3>
<img src="/img/Leaves" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/Leaves" style="width: 150px; height: 150px">
</div>`;
} else if (feature.properties.Class_name === 'Pumpkins') {
popupContent = `<div>
<h3>Pumpkin</h3>
<img src="/img/Pumpkin.png" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/Pumpkin.png" style="width: 150px; height: 150px">
</div>`;
} else if (feature.properties.Class_name === 'Grass Block') {
popupContent = `<div>
<h3>Grass Block</h3>
<img src="/img/Grass Block.png" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/Grass Block.png" style="width: 150px; height: 150px">
</div>`;
} else if (feature.properties.Class_name === 'Sand') {
popupContent = `<div>
<h3>Sand</h3>
<img src="/img/sand.png" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/sand.png" style="width: 150px; height: 150px">
</div>`;
} else if (feature.properties.Class_name === 'Stone/Gravel') {
popupContent = `<div class="popup-container image-container">
<h3>Stone and Gravel</h3>
<img src="/img/stone.png" style="width: 150px; height: 150px">
<img src="/img/Gravel.png" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/stone.png" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/Gravel.png" style="width: 150px; height: 150px">
</div>`;
} else if (feature.properties.Class_name === 'Water') {
popupContent = `<div>
<h3>Water</h3>
<img src="/img/water.png" style="width: 150px; height: 150px">
<img src="minecraftmaps/img/water.png" style="width: 150px; height: 150px">
</div>`;
}
currentLayer = layer;
Expand Down Expand Up @@ -71,4 +71,4 @@ fetch('data/classified.geojson')
return { color: 'transparent', fillColor: 'transparent' };
}
}).addTo(map);
});
});

0 comments on commit e4925f8

Please sign in to comment.