Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ <h2>Upload Addresses</h2>
state.addressData = results.data.map(row => ({
address: row[0],
company: row[1],
category: row[2]
category: row[2],
latitude: row[3], // New latitude column
longitude: row[4] // New longitude column
}));
state.currentIndex = 0;
state.zoom = 20;
Expand Down Expand Up @@ -464,15 +466,17 @@ <h2>Upload Addresses</h2>

const currentData = state.addressData[state.currentIndex];
const address = currentData.address;
const latitude = currentData.latitude;
const longitude = currentData.longitude;
const apiKey = apiKeyInput.value;

const params = {
center: address.replace(/ /g, "+"),
center: `${latitude},${longitude}`, // Using coordinates instead of address
zoom: state.zoom,
size: "640x640",
maptype: "satellite",
style: "feature:all|element:labels|visibility:off",
markers: `color:red|label:${state.currentIndex+1}|${address}`,
markers: `color:red|label:${state.currentIndex+1}|${latitude},${longitude}`, // Using coordinates for marker
key: apiKey
};

Expand Down Expand Up @@ -573,6 +577,8 @@ <h2>Upload Addresses</h2>
Address: currentData.address,
Company: currentData.company,
Category: currentData.category,
Latitude: currentData.latitude,
Longitude: currentData.longitude,
Zoom: state.zoom
};

Expand Down Expand Up @@ -609,8 +615,8 @@ <h2>Upload Addresses</h2>
return;
}

// Create CSV content
const headers = ["Address", "Company", "Category", "Zoom", ...Object.keys(state.buttonState)];
// Create CSV content with new headers
const headers = ["Address", "Company", "Category", "Latitude", "Longitude", "Zoom", ...Object.keys(state.buttonState)];

let csvContent = headers.join(",") + "\n";

Expand Down