-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpuri.html
More file actions
334 lines (288 loc) · 7.87 KB
/
puri.html
File metadata and controls
334 lines (288 loc) · 7.87 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="utf-8" />
<title>Peta Dakwah PHBI 1447 H</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet-minimap/dist/Control.MiniMap.min.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<style>
html, body {
margin: 0; padding: 0; height: 100%; font-family: Arial;
}
/* HEADER */
#header {
width: 100%; height: 40px;
background-color: #263238; color: white;
display: flex; align-items: center; justify-content: center;
font-weight: bold; font-size: 16px;
position: fixed; top: 0; left: 0;
z-index: 2000;
}
/* NAVBAR */
#navbar {
position: fixed;
top: 40px; left: 0;
width: 100%;
height: 60px;
background: #37474F;
display: flex;
align-items: center;
padding: 0 10px;
z-index: 1800;
}
#logo img {
height: 40px;
margin-right: 20px;
border-radius: 4px;
}
#menu { flex: 1; }
#menu ul {
list-style: none;
margin: 0; padding: 0;
display: flex;
}
#menu ul li { position: relative; }
#menu > ul > li > a {
padding: 10px 18px;
display: block;
color: white;
text-decoration: none;
}
#menu ul li:hover { background: #455A64; }
/* Dropdown */
#menu ul li ul {
display: none;
position: absolute;
top: 60px;
background: #455A64;
min-width: 200px;
padding: 0;
z-index: 9999;
}
#menu ul li:hover ul,
#menu ul li:focus-within ul {
display: block;
}
#menu ul li ul li a {
padding: 10px;
display: block;
color: white;
text-decoration: none;
}
#menu ul li ul li:hover {
background: #546E7A;
}
/* SEARCH */
#searchContainer {
width: 280px;
margin-right: 10px;
}
#searchContainer .leaflet-control-geocoder {
width: 100% !important;
margin: 0 !important;
box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
/* MAP AREA */
#map {
position: absolute;
top: 100px;
bottom: 0;
width: 100%;
min-height: calc(100% - 100px);
z-index: 1;
}
/* FOOTER KECIL */
#credit {
position: fixed;
bottom: 42px;
right: 10px;
z-index: 1500;
font-size: 12px;
padding: 4px 6px;
background:white;
border-radius:4px;
box-shadow:0 0 4px rgba(0,0,0,0.3);
}
/* FOOTER-BANNER BESAR */
#footer-banner {
width: 100%;
background: #0b3d0b;
color: white;
text-align: center;
padding: 12px 0;
font-size: 16px;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
}
</style>
</head>
<body>
<!-- HEADER -->
<div id="header">Peta Dakwah PHBI 1447 H</div>
<!-- NAVBAR -->
<div id="navbar">
<!-- LOGO -->
<div id="logo">
<img src="phbi_web/logo_arridhwan.jpg" alt="Logo Ar Ridhwan">
</div>
<!-- MENU -->
<div id="menu">
<ul>
<li><a href="puri.html">Home</a></li>
<li>
<a href="javascript:void(0)">Tentang ▼</a>
<ul>
<li><a href="phbi_web/profil.html">Profil PHBI 1447 H</a></li>
</ul>
</li>
<li>
<a href="javascript:void(0)">Zakat ▼</a>
<ul>
<li><a href="phbi_web/mustahiq.html">Pengusulan Mustahiq</a></li>
<li><a href="phbi_web/penyaluran.html">Penyaluran</a></li>
<li><a href="phbi_web/rekap.html">Rekapitulasi</a></li>
<li><a href="phbi_web/zakatmal.html">Kalkulator Zakat Mal</a></li>
</ul>
</li>
<li>
<a href="javascript:void(0)">Kegiatan ▼</a>
<ul>
<li><a href="phbi_web/penceramah.html">Penceramah Tarawih</a></li>
<li><a href="phbi_web/ifthor.html">Ifthor Jama'i</a></li>
<li><a href="phbi_web/idulfitri.html">Idul Fitri</a></li>
</ul>
</li>
</ul>
</div>
<!-- SEARCH -->
<div id="searchContainer"></div>
</div>
<!-- MAP -->
<div id="map"></div>
<!-- FOOTER KECIL -->
<div id="credit">phbi1447@2025</div>
<!-- FOOTER-BANNER -->
<div id="footer-banner">
<b><i>Menjalin Ukhuwah, Menggapai Mardhatillah</i></b>
</div>
<!-- Leaflet JS -->
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-minimap/dist/Control.MiniMap.min.js"></script>
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
<script>
// ============================
// CENTER PETA
// ============================
var centerPoint = [-6.470496, 106.845458];
var map = L.map("map", {
center: centerPoint,
zoom: 17
});
// Basemap
var osm = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(map);
var googleSat = L.tileLayer(
"https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
{ subdomains: ["mt0","mt1","mt2","mt3"], maxZoom: 20 }
);
// POI
var poiData = [
{ name: "Masjid Ar-Ridhwan (Center)", coords: centerPoint },
{ name: "Gerbang Puri Nirwana 1", coords: [-6.472532, 106.843382] },
];
var poiLayer = L.layerGroup();
poiData.forEach(pt => {
L.marker(pt.coords).bindPopup("<b>"+pt.name+"</b>").addTo(poiLayer);
});
poiLayer.addTo(map);
// Jalan utama
var jalanLayer = L.geoJSON({
"type":"FeatureCollection",
"features":[{
"type":"Feature",
"properties":{"Name":"Jalan Utama Puri Nirwana 1"},
"geometry":{
"type":"LineString",
"coordinates":[
[106.845399, -6.468588],
[106.844814, -6.471434],
[106.844707, -6.472452],
[106.843988, -6.472441],
[106.843382, -6.472532]
]
}
}]
},{
style:{ color:"#f44336", weight:4 }
}).addTo(map);
// Polygon perumahan
var puriLayer = L.geoJSON({
"type":"FeatureCollection",
"features":[{
"type":"Feature",
"properties":{"Name":"Puri Nirwana 1"},
"geometry":{
"type":"Polygon",
"coordinates":[[
[106.844112, -6.468311],
[106.845764, -6.468657],
[106.845839, -6.469051],
[106.847062, -6.469350],
[106.846810, -6.470426],
[106.846622, -6.470373],
[106.845742, -6.473069],
[106.844949, -6.473479],
[106.844814, -6.475003],
[106.844380, -6.474876],
[106.844262, -6.472717],
[106.843286, -6.472627],
[106.843243, -6.472243],
[106.844552, -6.472105],
[106.844670, -6.470528],
[106.843940, -6.470145],
[106.844112, -6.468311]
]]
}
}]
},{
style:{
color:"#1b5e20",
weight:3,
fillColor:"#66bb6a",
fillOpacity:0.35
}
}).addTo(map);
// Layer control
L.control.layers(
{ "OpenStreetMap": osm, "Google Satellite": googleSat },
{ "Puri Nirwana 1": puriLayer, "Jalan Utama": jalanLayer },
{ collapsed:false }
).addTo(map);
// Scale
L.control.scale().addTo(map);
// Inset
new L.Control.MiniMap(
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"),
{ toggleDisplay:true }
).addTo(map);
// Search bar
var geocoder = L.Control.geocoder({ defaultMarkGeocode:true });
geocoder.addTo(map);
var searchElement = document.querySelector(".leaflet-control-geocoder");
document.getElementById("searchContainer").appendChild(searchElement);
// Klik koordinat
map.on("click", e=>{
L.popup()
.setLatLng(e.latlng)
.setContent("Lat: "+e.latlng.lat.toFixed(6)+"<br>Lng: "+e.latlng.lng.toFixed(6))
.openOn(map);
});
// Popup default
L.marker(centerPoint).bindPopup("<b>Masjid Ar Ridhwan</b>").addTo(map).openPopup();
</script>
</body>
</html>