Commit 00014fdb authored by Alfakhori's avatar Alfakhori
Browse files

Update public/data/pins.csv, public/index.html

parent ba4cc9e5
Pipeline #10074 passed with stage
in 6 seconds
Showing with 5 additions and 6 deletions
+5 -6
lat,lng,name,color
48.773330,9.181970,Muhammad's first study area,#0000ff
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Study Areas Map</title> <title>Study Areas Map 2</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" /> <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script> <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script>
...@@ -37,13 +37,10 @@ ...@@ -37,13 +37,10 @@
maxZoom: 19, maxZoom: 19,
}).addTo(map); }).addTo(map);
// Embedded CSV data as a string (Add pins here manually)
const csvData = `lat,lng,name,color
48.773330,9.181970,Muhammad's first study area,#0000ff`;
// Function to load pins from CSV and add them to the map // Function to load pins from CSV and add them to the map
function loadPins() { function loadPins() {
Papa.parse(csvData, { Papa.parse('/data/pins.csv', {
download: true,
header: true, header: true,
complete: function(results) { complete: function(results) {
results.data.forEach(pin => { results.data.forEach(pin => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment