-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
113 lines (103 loc) · 4.99 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<title>Random Point Generator</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- SEO Meta Tags -->
<meta name="description" content="Generate random geographic points within a user-defined area. Useful for sampling, simulations, and data analysis.">
<meta name="keywords" content="random points, geographic points, sampling, data analysis, GIS, map tool, random point generator">
<!-- Open Graph Meta Tags (Optional) -->
<meta property="og:title" content="Random Point Generator">
<meta property="og:description" content="Generate random geographic points within a user-defined area.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://wincowger.com/mapRPG/">
<!-- Replace with your image URL -->
<meta property="og:image" content="https://github.com/wincowgerDEV/mapRPG/blob/main/Screenshot%202024-09-30%20162023.png?raw=true">
<!-- Favicon (Optional) -->
<!-- <link rel="icon" href="/path-to-favicon.ico"> -->
<!-- Ethical Ads Script in the Head -->
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!-- Leaflet Draw CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css" />
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<style>
/* Map Styling */
#map {
height: calc(100vh - 70px); /* Adjust height based on header */
}
/* Adjust Leaflet Draw toolbar position */
.leaflet-draw-toolbar {
margin-top: 10px;
}
/* Adjust file input styles */
.form-control[type="file"] {
padding: 0.2rem 0.5rem;
height: auto;
}
</style>
</head>
<body>
<!-- Ethical Ads Script in the Body -->
<div class="dark raised" data-ea-publisher="openanalysisorg" data-ea-type="text" data-ea-style="fixedfooter"></div>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="#">Random Point Generator</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarButtons" aria-controls="navbarButtons" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarButtons">
<div class="ms-auto navbar-nav">
<div class="d-flex align-items-center me-2 mb-2 mb-lg-0">
<label for="numPoints" class="text-white me-2 mb-0">Number of Points:</label>
<input type="number" id="numPoints" class="form-control" value="30" min="1" style="width: 80px;">
</div>
<button id="instructionsBtn" class="btn btn-outline-light me-2 mb-2 mb-lg-0">Instructions</button>
<button id="downloadBtn" class="btn btn-outline-light me-2 mb-2 mb-lg-0" disabled>Download CSV</button>
<button id="reportIssueBtn" class="btn btn-outline-light mb-2 mb-lg-0">Report Issue</button>
</div>
</div>
</div>
</nav>
<div id="map"></div>
<!-- Instructions Modal -->
<div class="modal fade" id="instructionsModal" tabindex="-1" aria-labelledby="instructionsModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">How to Use the App</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<ul>
<li>Use the drawing tools on the map to create a polygon.</li>
<li>Once the polygon is drawn, the "Download CSV" button will be enabled.</li>
<li>Select the number of random points you want to generate.</li>
<li>Click "Download CSV" to get random points within your polygon.</li>
<li>The generated points will be displayed on the map.</li>
<li>You can switch between different basemaps using the control on the map.</li>
<li>To report issues or feedback, click "Report Issue".</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Scripts -->
<!-- Leaflet JS -->
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<!-- Leaflet Draw JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js"></script>
<!-- Turf.js -->
<script src="https://unpkg.com/@turf/turf/turf.min.js"></script>
<!-- FileSaver.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<!-- Bootstrap Bundle JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS -->
<script src="app.js"></script>
</body>
</html>