fred 2024-03-04 12:02:55 +01:00
parent 81623f0b02
commit 59870b60a3
6 changed files with 33 additions and 6 deletions

2
.chain
View File

@ -1 +1 @@
QmSqkMY7ZHTLGWbPJx3FJ7Wj3XkXKNE7TbCggNQuvoWYAP QmWgScr1G7R8oYDrWQqfsB7CLRphuwKv1yaABu53nAxEVY

View File

@ -0,0 +1 @@
QmSqkMY7ZHTLGWbPJx3FJ7Wj3XkXKNE7TbCggNQuvoWYAP

View File

@ -0,0 +1 @@
QmYG8jV1YhrhjpCYJYUsBReZW7Q1wTED6n3wkBYJtVrg48

2
.moats
View File

@ -1 +1 @@
202402261746434192 202403041102248073

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="./favicon.ico"> <link rel="icon" type="image/x-icon" href="./favicon.ico">
<title>UPlanet Map View ! Please Zoom In.</title> <title>UPlanet Grid Navigator - Layers Zoom In -</title>
<link rel="stylesheet" href="leaflet.css" /> <link rel="stylesheet" href="leaflet.css" />
<style> <style>
.clickable-area { .clickable-area {
@ -42,7 +42,17 @@
z-index: 1300; z-index: 1300;
} }
#upper-layer-button {
position: absolute;
top: 10px;
right: 10px;
z-index: 1002;
background-color: #3498db;
color: #fff;
padding: 10px 20px;
border: none;
cursor: pointer;
}
</style> </style>
</head> </head>
@ -51,7 +61,7 @@
<div id="coordinates-display"></div> <!-- Coordinates display element --> <div id="coordinates-display"></div> <!-- Coordinates display element -->
<div id="map" style="width: 100%; height: 100vh;"></div> <div id="map" style="width: 100%; height: 100vh;"></div>
</div> </div>
<button id="upper-layer-button">UP</button>
<script src="leaflet.js"></script> <script src="leaflet.js"></script>
<script> <script>
@ -210,9 +220,21 @@
attribution: 'U Planet' attribution: 'U Planet'
}).addTo(map); }).addTo(map);
const gridSize = 10; // Number of rows and columns in the grid const gridSize = 10; // Number of rows and columns in the grid
const NSize = deg / 10; // Size of each grid cell const NSize = deg / 10; // Size of each grid cell
document.getElementById('upper-layer-button').addEventListener('click', function() {
if (deg >= 10) {
window.location.href = 'welcome.html';
} else {
const newDeg = deg * 10;
const url = `map_render.html?southWestLat=${southWestLat}&southWestLon=${southWestLon}&deg=${newDeg}`;
window.location.href = url;
}
});
// Create a HTML element for displaying coordinates // Create a HTML element for displaying coordinates
const coordinatesDisplay = document.getElementById('coordinates-display'); const coordinatesDisplay = document.getElementById('coordinates-display');
@ -313,6 +335,8 @@ for (let latIndex = 0; latIndex < gridSize; latIndex++) {
for (let lonIndex = 0; lonIndex < gridSize; lonIndex++) { for (let lonIndex = 0; lonIndex < gridSize; lonIndex++) {
const lat = southWestLat + latIndex * NSize; const lat = southWestLat + latIndex * NSize;
const lon = southWestLon + lonIndex * NSize; const lon = southWestLon + lonIndex * NSize;
//~ const lat = southWestLat + (southWestLat < 0 ? -latIndex * NSize : latIndex * NSize);
//~ const lon = southWestLon + (southWestLon < 0 ? -lonIndex * NSize : lonIndex * NSize);
// Create a clickable rectangle // Create a clickable rectangle
const rectangle = L.rectangle( const rectangle = L.rectangle(

View File

@ -39,7 +39,8 @@ sed -i "s~${OLD}~${TW}~g" ${MY_PATH}/README.md
echo '# MAKE YOUR GIT IPFS LINKING echo '# MAKE YOUR GIT IPFS LINKING
git add . git add .
git commit -m "Try ME : https://ipfs.copylaradio.com/ipfs/'${TW}'" read COMMENT
git commit -m "$COMMENT : https://ipfs.copylaradio.com/ipfs/'${TW}'/earth"
git push git push
' '
exit 0 exit 0