-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
123 lines (117 loc) · 5.97 KB
/
Copy pathindex.html
File metadata and controls
123 lines (117 loc) · 5.97 KB
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
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GPS Map Camera</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="app-container">
<header>
<div class="logo">
<svg viewBox="0 0 24 24" width="32" height="32" fill="none" stroke="#4CAF50" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/>
<path d="M2 12h20"/>
</svg>
<h1>GPS Map Camera</h1>
</div>
<p class="subtitle">Upload a photo and enter coordinates to generate a geotagged image</p>
</header>
<main>
<!-- Input Section -->
<div id="inputSection">
<div class="upload-area" id="uploadArea">
<svg viewBox="0 0 24 24" width="48" height="48" fill="none" stroke="#888" stroke-width="1.5">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<circle cx="8.5" cy="8.5" r="1.5"/>
<path d="M21 15l-5-5L5 21"/>
</svg>
<p>Drag & drop a photo here or click to browse</p>
<input type="file" id="fileInput" accept="image/*" />
</div>
<div class="preview-thumb hidden" id="previewThumb">
<img id="previewImg" />
<span id="fileName"></span>
<button id="clearFileBtn" class="btn-clear" title="Remove">×</button>
</div>
<div class="coords-form">
<div class="form-row">
<div class="form-group">
<label for="latInput">Latitude</label>
<input type="number" id="latInput" step="any" placeholder="Enter latitude" />
</div>
<div class="form-group">
<label for="lngInput">Longitude</label>
<input type="number" id="lngInput" step="any" placeholder="Enter longitude" />
</div>
<div class="form-group" style="flex:0; align-self:flex-end;">
<button id="lookupBtn" class="btn btn-lookup" type="button" title="Auto-fill location from coordinates" disabled>
<span id="lookupIcon">🔍</span>
</button>
</div>
</div>
<div id="autoFillNotice" class="auto-fill-notice hidden">✓ Location details auto-filled from coordinates</div>
<div class="form-row form-row-3">
<div class="form-group">
<label for="cityInput">City</label>
<input type="text" id="cityInput" placeholder="Enter city name" />
</div>
<div class="form-group">
<label for="stateInput">State</label>
<input type="text" id="stateInput" placeholder="Enter state" />
</div>
<div class="form-group">
<label for="countryInput">Country</label>
<input type="text" id="countryInput" placeholder="Enter country" />
</div>
</div>
<div class="form-row">
<div class="form-group" style="flex:0.4;">
<label for="pincodeInput">Pincode</label>
<div class="pincode-wrapper">
<input type="text" id="pincodeInput" placeholder="Enter pincode" maxlength="10" />
<span id="pincodeStatus" class="pincode-status"></span>
</div>
</div>
<div class="form-group" style="flex:1;">
<label for="addressInput">Address</label>
<input type="text" id="addressInput" placeholder="Enter full street address" />
</div>
</div>
<div class="form-group" style="margin-bottom:16px;">
<label for="dateInput">Date / Time</label>
<input type="datetime-local" id="dateInput" />
</div>
<button id="generateBtn" class="btn btn-primary" disabled>Generate GeoTagged Image</button>
</div>
</div>
<!-- Loading -->
<div class="loading-section hidden" id="loadingSection">
<div class="spinner"></div>
<p>Generating overlay...</p>
</div>
<!-- Result -->
<div class="result-section hidden" id="resultSection">
<div class="result-preview">
<canvas id="outputCanvas"></canvas>
</div>
<div class="actions">
<button id="downloadBtn" class="btn btn-primary">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
Download Image
</button>
<button id="newPhotoBtn" class="btn">New Photo</button>
</div>
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/piexifjs@1.0.6/piexif.min.js"></script>
<script src="app.js"></script>
</body>
</html>