-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.htm
More file actions
802 lines (761 loc) · 34.1 KB
/
Copy pathindex.htm
File metadata and controls
802 lines (761 loc) · 34.1 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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- ============ MÉTADONNÉES SEO ============ -->
<title>Universal Map2web - Extension QGIS pour cartes web interactives par Jean-Baptiste KIBORA</title>
<meta name="description" content="Extension QGIS Universal Map2web pour exporter des cartes web interactives avec Leaflet, avec mode PostgreSQL/PostGIS dynamique. Développée par Jean-Baptiste KIBORA. Tutoriels sur YouTube.">
<meta name="keywords" content="QGIS, carte web, Leaflet, export cartes, Universal Map2web, plugin QGIS, géomatique, PostgreSQL, PostGIS, données dynamiques, Jean-Baptiste KIBORA, CEFOGIA">
<meta name="author" content="Jean-Baptiste KIBORA">
<meta name="robots" content="index, follow">
<!-- IMPORTANT : remplacez par l'URL réelle où cette page de documentation est hébergée -->
<link rel="canonical" href="https://geomatic-web.github.io/universal_map2web/">
<link rel="icon" type="image/png" href="icon.png">
<!-- Liens d'autorité -->
<link rel="author" href="https://geomatic-web.github.io/seformerengeomatique">
<link rel="me" href="https://www.youtube.com/@cefogia">
<link rel="me" href="https://github.com/geomatic-web">
<!-- Open Graph (réseaux sociaux) -->
<meta property="og:title" content="Universal Map2web - Extension QGIS pour cartes web interactives">
<meta property="og:description" content="Extension QGIS pour exporter des cartes web interactives avec Leaflet, avec mode PostgreSQL/PostGIS dynamique. Par Jean-Baptiste KIBORA.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://geomatic-web.github.io/universal_map2web/">
<meta property="og:image" content="https://github.com/geomatic-web/universal_map2web/raw/main/icon.png">
<meta property="og:image:alt" content="Icône Universal Map2web">
<meta property="og:image:width" content="512">
<meta property="og:image:height" content="512">
<meta property="og:locale" content="fr_FR">
<meta property="og:locale:alternate" content="en_US">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Universal Map2web - Extension QGIS pour cartes web interactives">
<meta name="twitter:description" content="Extension QGIS pour exporter des cartes web interactives avec Leaflet. Par Jean-Baptiste KIBORA.">
<meta name="twitter:image" content="https://github.com/geomatic-web/universal_map2web/raw/main/icon.png">
<!-- ============ DONNÉES STRUCTURÉES (JSON-LD) ============ -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Universal Map2web",
"description": "Extension QGIS pour exporter des cartes web interactives avec Leaflet, avec mode PostgreSQL/PostGIS dynamique.",
"applicationCategory": "Geospatial",
"operatingSystem": "QGIS 3.40+",
"softwareVersion": "1.2.1",
"datePublished": "2024-01-01",
"dateModified": "2026-01-01",
"downloadUrl": "https://plugins.qgis.org/plugins/universal_map2web/",
"installUrl": "https://plugins.qgis.org/plugins/universal_map2web/",
"screenshot": "https://github.com/geomatic-web/universal_map2web/raw/main/icon.png",
"keywords": "QGIS, Leaflet, PostgreSQL, PostGIS, cartes web interactives",
"author": {
"@type": "Person",
"name": "Jean-Baptiste KIBORA",
"url": "https://geomatic-web.github.io/seformerengeomatique",
"sameAs": [
"https://www.youtube.com/@cefogia",
"https://github.com/geomatic-web"
]
},
"sameAs": [
"https://github.com/geomatic-web/universal_map2web",
"https://plugins.qgis.org/plugins/universal_map2web/"
],
"url": "https://geomatic-web.github.io/universal_map2web/",
"version": "1.2.1",
"license": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
}
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background: #f5f7fa;
}
.layout {
display: flex;
align-items: flex-start;
max-width: 1400px;
margin: 0 auto;
}
.container {
flex: 1;
min-width: 0;
max-width: 1100px;
margin: 0 auto;
padding: 30px 30px 30px 0;
}
header {
background: linear-gradient(135deg, #16a085, #1a5276);
color: white;
padding: 30px 20px;
text-align: center;
}
header h1 {
font-size: 2.5em;
margin-bottom: 10px;
}
header p {
font-size: 1.2em;
opacity: 0.9;
}
.badge {
display: inline-block;
background: #27ae60;
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.9em;
margin-top: 15px;
}
.sidebar {
width: 260px;
flex-shrink: 0;
position: sticky;
top: 0;
height: 100vh;
overflow-y: auto;
background: white;
border-right: 1px solid #e5e9ee;
padding: 25px 18px;
}
.sidebar .sidebar-title {
font-size: 0.75em;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #999;
margin: 18px 0 8px 10px;
font-weight: bold;
}
.sidebar .sidebar-title:first-child {
margin-top: 0;
}
nav ul {
list-style: none;
}
nav ul li a {
display: block;
text-decoration: none;
color: #444;
font-weight: 600;
font-size: 0.95em;
padding: 9px 12px;
border-radius: 8px;
border-left: 3px solid transparent;
transition: background 0.2s, color 0.2s, border-color 0.2s;
margin-bottom: 2px;
}
nav ul li a:hover {
background: #eafaf5;
color: #16a085;
}
nav ul li a.active {
background: #eafaf5;
color: #16a085;
border-left-color: #16a085;
}
.mobile-toggle {
display: none;
background: white;
border: none;
color: #16a085;
font-weight: bold;
font-size: 1em;
padding: 12px 20px;
width: 100%;
text-align: left;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.mobile-toggle::after {
content: "▾";
float: right;
}
.section {
background: white;
border-radius: 15px;
padding: 25px;
margin-bottom: 25px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.section h2 {
color: #16a085;
border-bottom: 3px solid #16a085;
padding-bottom: 10px;
margin-bottom: 20px;
}
.section h3 {
color: #1a5276;
margin: 20px 0 10px 0;
}
.section h4 {
color: #555;
margin: 15px 0 10px 0;
}
code {
background: #f4f4f4;
padding: 2px 6px;
border-radius: 4px;
font-family: 'Consolas', monospace;
font-size: 0.9em;
color: #c7254e;
}
pre {
background: #2d2d2d;
color: #f8f8f2;
padding: 15px;
border-radius: 8px;
overflow-x: auto;
font-family: 'Consolas', monospace;
font-size: 0.9em;
margin: 15px 0;
}
.note {
background: #fef9e6;
border-left: 4px solid #f39c12;
padding: 15px;
margin: 15px 0;
border-radius: 5px;
}
.warning {
background: #fee;
border-left: 4px solid #e74c3c;
padding: 15px;
margin: 15px 0;
border-radius: 5px;
}
.success {
background: #e8f8f5;
border-left: 4px solid #27ae60;
padding: 15px;
margin: 15px 0;
border-radius: 5px;
}
.tip {
background: #e3f2fd;
border-left: 4px solid #16a085;
padding: 15px;
margin: 15px 0;
border-radius: 5px;
}
table {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
}
th, td {
border: 1px solid #ddd;
padding: 10px;
text-align: left;
}
th {
background: #16a085;
color: white;
}
tr:nth-child(even) {
background: #f9f9f9;
}
.grid-2 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
}
.card {
background: #f9f9f9;
border-radius: 10px;
padding: 15px;
border: 1px solid #eee;
}
footer {
text-align: center;
padding: 20px;
color: #777;
font-size: 0.9em;
}
@media (max-width: 900px) {
.layout {
flex-direction: column;
}
.mobile-toggle {
display: block;
}
.sidebar {
width: 100%;
height: auto;
position: relative;
border-right: none;
border-bottom: 1px solid #e5e9ee;
padding: 10px 18px 15px;
display: none;
}
.sidebar.open {
display: block;
}
.container {
padding: 15px;
max-width: 100%;
}
}
.header-content {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.plugin-icon {
width: 80px;
height: 80px;
background: white;
border-radius: 18px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.plugin-icon img {
width: 60px;
height: 60px;
border-radius: 12px;
}
.header-text {
text-align: left;
}
@media (max-width: 768px) {
.header-content {
flex-direction: column;
text-align: center;
}
.header-text {
text-align: center;
}
}
</style>
</head>
<body>
<header>
<div class="header-content">
<div class="plugin-icon">
<img src="icon.png" alt="Universal Map2web">
</div>
<div class="header-text">
<h1>Universal Map2web</h1>
<p>QGIS plugin to export interactive Leaflet web maps</p>
<div class="badge">Version 1.2.1</div>
</div>
</div>
</header>
<button class="mobile-toggle" id="mobileToggle">Documentation menu</button>
<div class="layout">
<aside class="sidebar" id="sidebar">
<nav aria-label="Documentation navigation">
<p class="sidebar-title">Getting started</p>
<ul>
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#tools">Tools & Options</a></li>
<li><a href="#themes">Themes & Customization</a></li>
</ul>
<p class="sidebar-title">Advanced</p>
<ul>
<li><a href="#filtering">Advanced Filtering</a></li>
<li><a href="#postgis">PostGIS Dynamic Mode</a></li>
</ul>
<p class="sidebar-title">Help</p>
<ul>
<li><a href="#tips">Tips</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#support">Support</a></li>
</ul>
</nav>
</aside>
<main class="container">
<!-- ==================== INSTALLATION ==================== -->
<div id="installation" class="section">
<h2>Installation</h2>
<div class="grid-2">
<div class="card">
<h3>From the QGIS plugin repository</h3>
<ol>
<li>Open QGIS</li>
<li>Menu <code>Plugins</code> → <code>Manage and Install Plugins</code></li>
<li>Search for <strong>"Universal Map2web"</strong></li>
<li>Click <strong>Install</strong></li>
</ol>
<p style="margin-top:10px;">Or view the plugin page directly:
<a href="https://plugins.qgis.org/plugins/universal_map2web/">plugins.qgis.org/plugins/universal_map2web</a>
</p>
</div>
<div class="card">
<h3>From GitHub</h3>
<ol>
<li>Download the ZIP from
<a href="https://github.com/geomatic-web/universal_map2web">GitHub</a>
</li>
<li>QGIS → <code>Plugins</code> → <code>Install from ZIP</code></li>
<li>Select the downloaded ZIP file</li>
<li>Restart QGIS if prompted</li>
</ol>
</div>
</div>
<div class="note">
<strong>Requires QGIS 3.0 or higher</strong> (compatible up to QGIS 4.x). The plugin interface
automatically follows the language of your QGIS installation (French / English).
</div>
</div>
<!-- ==================== USAGE ==================== -->
<div id="usage" class="section">
<h2>Usage</h2>
<h3>1. Launch the plugin</h3>
<p>Click on the <strong>Universal Map2web</strong> icon in the QGIS toolbar, or open it from the
<code>Web</code> menu.</p>
<h3>General tab</h3>
<ul>
<li>Choose the <strong>web library</strong> used to render the map (Leaflet)</li>
<li>Select the <strong>basemap</strong>: OpenStreetMap, Google Satellite, or a custom tile URL
(e.g. <code>https://{s}.tile.example.com/{z}/{x}/{y}.png</code>)</li>
<li>Enable the <strong>tools</strong> you want embedded in the exported map (see
<a href="#tools">Tools & Options</a>)</li>
</ul>
<h3>Customization tab</h3>
<ul>
<li>Set the <strong>map title</strong> shown in the browser tab and header</li>
<li>Add an optional <strong>logo</strong> displayed in the header</li>
<li>Pick the <strong>header color</strong></li>
<li>Choose one of the four <strong>UI themes</strong> (see
<a href="#themes">Themes</a>)</li>
</ul>
<h3>Layers tab</h3>
<ol>
<li>Check the <strong>layers</strong> to export (use "Select all" / "Deselect all" / "Invert" to
speed this up)</li>
<li>For each layer, configure which <strong>attribute fields</strong> appear in the popup when a
feature is clicked</li>
</ol>
<h3>Advanced tab</h3>
<ul>
<li><strong>Simplify geometries</strong> — reduces vertex count for faster loading</li>
<li><strong>Compress JSON data</strong> — smaller GeoJSON output files</li>
<li><strong>Round coordinates</strong> — trims decimal precision</li>
<li><strong>Load PostGIS layers dynamically from PostgreSQL</strong> — keeps layers already
connected to PostgreSQL/PostGIS in QGIS live on the exported map instead of freezing them
into static GeoJSON (see <a href="#postgis">PostGIS Dynamic Mode</a>)</li>
<li><strong>Export as ZIP</strong> — packages the whole export in a single archive</li>
<li><strong>Open automatically in browser</strong> — starts a local server and opens the map
once export finishes</li>
</ul>
<h3>Wiki tab</h3>
<p>Built-in quick-reference documentation, available in French or English depending on your QGIS
language.</p>
<h3>Exporting</h3>
<ol>
<li>Once everything is configured, click <strong>"OK"</strong></li>
<li>Choose the destination folder</li>
<li>The map opens automatically in your default browser (if enabled)</li>
</ol>
</div>
<!-- ==================== TOOLS & OPTIONS ==================== -->
<div id="tools" class="section">
<h2>Tools & Options</h2>
<p>Each tool below can be enabled or disabled independently in the <strong>General</strong> tab before
export.</p>
<table>
<tr><th>Option</th><th>Effect on the exported map</th></tr>
<tr><td>Address search</td><td>Adds a search bar to locate an address on the map</td></tr>
<tr><td>GPS geolocation</td><td>Adds a button to center the map on the visitor's current position</td></tr>
<tr><td>Measure (distance/area)</td><td>Adds interactive distance and area measurement tools</td></tr>
<tr><td>Print button</td><td>Adds a button that triggers the browser's print dialog for the map</td></tr>
<tr><td>Fullscreen mode</td><td>Adds a control to expand the map to fullscreen</td></tr>
<tr><td>Overview (MiniMap)</td><td>Displays a small overview map in a corner of the main map</td></tr>
<tr><td>Scale bar</td><td>Displays a graphic distance scale (enabled by default)</td></tr>
<tr><td>Cursor position</td><td>Displays live latitude/longitude under the mouse pointer</td></tr>
<tr><td>Attribution</td><td>Displays the map/library credits (enabled by default)</td></tr>
<tr><td>Advanced filter</td><td>Adds the attribute filtering panel — see <a href="#filtering">Advanced Filtering</a></td></tr>
</table>
<h3>Layer management on the exported map</h3>
<ul>
<li><strong>Show / hide a layer</strong>: toggle its checkbox in the legend panel</li>
<li><strong>Point clustering</strong>: enable "Cluster points" per layer (point layers only)</li>
<li><strong>Legend</strong>: colors and categories are generated automatically from your QGIS
symbology (Simple, Categorized, Graduated, and Rule-based renderers are all supported)</li>
<li><strong>Expand / Collapse all</strong>: quickly fold or unfold every layer group in the legend</li>
</ul>
</div>
<!-- ==================== THEMES ==================== -->
<div id="themes" class="section">
<h2>Themes & Customization</h2>
<div class="grid-2">
<div class="card">
<h3>Light</h3>
<p>Clean, bright interface — best for printed screenshots and daytime presentations.</p>
</div>
<div class="card">
<h3>Dark</h3>
<p>Low-glare dark interface, well suited for satellite basemaps and long viewing sessions.</p>
</div>
<div class="card">
<h3>Professional</h3>
<p>Neutral, corporate look for official reports and institutional web maps.</p>
</div>
<div class="card">
<h3>Colorful</h3>
<p>Vibrant accent colors, ideal for public-facing or promotional map dashboards.</p>
</div>
</div>
<div class="tip">
<strong>Tip:</strong> the header color, title, and logo are independent from the theme, so you can
mix your organization's branding with any of the four base themes.
</div>
</div>
<!-- ==================== ADVANCED FILTERING ==================== -->
<div id="filtering" class="section">
<h2>Advanced Filtering</h2>
<p>When enabled, a filter panel appears in the exported map's sidebar, letting visitors query features
without touching QGIS.</p>
<h3>How to use it</h3>
<ol>
<li>Select a <strong>layer</strong></li>
<li>Select a <strong>field</strong></li>
<li>Select an <strong>operator</strong></li>
<li>Type or click a <strong>value</strong></li>
<li>Click <strong>"Apply"</strong> — matching features are highlighted on the map</li>
</ol>
<h3>Available operators</h3>
<table>
<tr><th>Operator</th><th>Meaning</th></tr>
<tr><td><code>=</code></td><td>equal to</td></tr>
<tr><td><code>≠</code></td><td>different from</td></tr>
<tr><td><code>⊃</code></td><td>contains</td></tr>
<tr><td>starts with</td><td>text starts with the given value</td></tr>
<tr><td><code>></code></td><td>greater than</td></tr>
<tr><td><code><</code></td><td>less than</td></tr>
<tr><td><code>≥</code></td><td>greater than or equal to</td></tr>
<tr><td><code>≤</code></td><td>less than or equal to</td></tr>
</table>
<div class="success">
<strong>Reset:</strong> click <strong>"Reset"</strong> at any time to clear the filter and show all
features again.
</div>
</div>
<!-- ==================== POSTGIS DYNAMIC MODE ==================== -->
<div id="postgis" class="section">
<h2>PostGIS Dynamic Mode <span class="badge" style="margin-top:0;">New in 1.2.1</span></h2>
<p>For layers already connected to PostgreSQL/PostGIS in QGIS, Universal Map2web can now keep them
<strong>live</strong> on the exported web map instead of freezing them into a static GeoJSON
snapshot taken at export time.</p>
<h3>How to enable it</h3>
<ol>
<li>In the export dialog, check <strong>"Load PostGIS layers dynamically from PostgreSQL (instead
of a static export)"</strong></li>
<li>The plugin automatically reuses the connection already configured in QGIS — no credentials
need to be re-entered</li>
<li>Export as usual — layers not connected to PostgreSQL, or left unchecked, are still exported
as static GeoJSON</li>
</ol>
<h3>What gets generated</h3>
<ul>
<li>A single <code>get_data.php</code> endpoint that serves live feature data to the web map</li>
<li>A protected <code>db_config.php</code> file holding the database connection details</li>
<li>A random <strong>API key</strong>, generated for each export, restricting access to the
<code>get_data.php</code> endpoint</li>
<li>An <code>.htaccess</code> file that blocks direct access to <code>db_config.php</code></li>
</ul>
<h3>How it behaves</h3>
<p>The web map queries the database live, with optional bounding-box filtering, so visitors always
see current data instead of a snapshot frozen at export time. Layers left in static mode continue
to work exactly as before.</p>
<div class="warning">
<strong>Requirement:</strong> hosting the exported site in this mode requires a
<strong>PHP-capable web server</strong> with the <code>pdo_pgsql</code> extension enabled. A plain
static file host (e.g. GitHub Pages, a basic file share) is <strong>not enough</strong> for
dynamic layers — use static GeoJSON export instead in that case.
</div>
<div class="note">
<strong>Security tip:</strong> keep the generated <code>db_config.php</code> and
<code>.htaccess</code> files in place and unmodified — they are what prevents direct, unauthenticated
access to your database credentials and query endpoint.
</div>
</div>
<!-- ==================== TIPS ==================== -->
<div id="tips" class="section">
<h2>Tips and Best Practices</h2>
<div class="grid-2">
<div class="card">
<h3>Keep it light</h3>
<p>Limit exports to around <strong>10 active layers</strong> for the best browser
performance.</p>
</div>
<div class="card">
<h3>File size</h3>
<p>Keep individual layers under roughly <strong>50 MB</strong>; enable "Simplify geometries" and
"Compress JSON data" for large datasets.</p>
</div>
<div class="card">
<h3>Coordinate system</h3>
<p>Use <strong>WGS84 (EPSG:4326)</strong> for your project — Leaflet basemaps expect
geographic coordinates.</p>
</div>
<div class="card">
<h3>Preview first</h3>
<p>Check symbology and labels in QGIS before exporting — the web map mirrors your current
project styling.</p>
</div>
<div class="card">
<h3>Popups</h3>
<p>Only select the fields visitors actually need in the popup configuration — fewer fields
means a lighter, cleaner popup.</p>
</div>
<div class="card">
<h3>Sharing the export</h3>
<p>Use "Export as ZIP" to get a single archive you can upload to a web server or send to a
colleague.</p>
</div>
</div>
</div>
<!-- ==================== TROUBLESHOOTING ==================== -->
<div id="troubleshooting" class="section">
<h2>Troubleshooting</h2>
<h3>The map doesn't open automatically after export</h3>
<div class="warning">
<strong>Symptom:</strong> export finishes without error, but no browser window appears.
</div>
<div class="success">
<strong>Solutions:</strong>
<ul>
<li>Make sure <strong>"Open automatically in browser"</strong> is checked in the Advanced tab</li>
<li>Check that your firewall or antivirus isn't blocking the local port used to preview the
map</li>
<li>Open <code>index.html</code> manually from the export folder in your browser</li>
</ul>
</div>
<h3>The legend or some labels stay in the wrong language</h3>
<div class="success">
<strong>Solutions:</strong>
<ul>
<li>Make sure QGIS's interface language is set the way you want under
<code>Settings</code> → <code>Options</code> → <code>General</code></li>
<li>Restart QGIS after changing the language so the plugin reloads its translations</li>
</ul>
</div>
<h3>A layer doesn't appear in the exported map</h3>
<div class="success">
<strong>Solutions:</strong>
<ul>
<li>Confirm the layer is checked in the <strong>Layers</strong> tab of the export dialog</li>
<li>Make sure the layer's visibility is turned on in the QGIS Layers panel</li>
<li>Vector layers only — raster layers are not exported to Leaflet by this plugin</li>
</ul>
</div>
<h3>Colors or categories in the web map don't match QGIS</h3>
<div class="success">
<strong>Solutions:</strong>
<ul>
<li>Re-check your renderer type (Simple, Categorized, Graduated, Rule-based) is fully applied
in QGIS before exporting</li>
<li>Refresh the layer's symbology panel in QGIS, then re-export</li>
</ul>
</div>
<h3>PostGIS layers show no data once hosted online</h3>
<div class="warning">
<strong>Symptom:</strong> the map works locally but dynamic layers stay empty once deployed to a
web server.
</div>
<div class="success">
<strong>Solutions:</strong>
<ul>
<li>Confirm the host is a <strong>PHP server with the <code>pdo_pgsql</code> extension</strong>
enabled — a static-only host cannot run <code>get_data.php</code></li>
<li>Make sure <code>db_config.php</code> and <code>.htaccess</code> were uploaded alongside
the rest of the export, unmodified</li>
<li>Check that the PostgreSQL server accepts remote connections from your web host, and that
its firewall allows the connection</li>
</ul>
</div>
<div class="note">
<strong>Good to know:</strong> most issues come down to browser/firewall permissions for the local
preview server, or a layer's visibility/selection state in QGIS at export time.
</div>
</div>
<!-- ==================== REQUIREMENTS ==================== -->
<div id="requirements" class="section">
<h2>Requirements</h2>
<table>
<tr><th>Component</th><th>Requirement</th></tr>
<tr><td>QGIS</td><td>3.0 or higher (up to 4.x)</td></tr>
<tr><td>Browser</td><td>Chrome 90+, Firefox 88+, Edge 90+</td></tr>
<tr><td>Memory</td><td>4 GB RAM minimum</td></tr>
<tr><td>Internet</td><td>Required for basemaps and web libraries (Leaflet, plugins)</td></tr>
<tr><td>Hosting (PostGIS dynamic mode only)</td><td>PHP-capable web server with the <code>pdo_pgsql</code> extension enabled</td></tr>
</table>
</div>
<!-- ==================== SUPPORT ==================== -->
<div id="support" class="section">
<h2>Support and Contact</h2>
<div class="grid-2">
<div class="card">
<h3>Email</h3>
<p><a href="mailto:jeanbaptiste.kibora@tic.gov.bf">jeanbaptiste.kibora@tic.gov.bf</a></p>
</div>
<div class="card">
<h3>GitHub</h3>
<p><a href="https://github.com/geomatic-web/universal_map2web">github.com/geomatic-web/universal_map2web</a></p>
</div>
<div class="card">
<h3>QGIS Plugin Repository</h3>
<p><a href="https://plugins.qgis.org/plugins/universal_map2web/">plugins.qgis.org/plugins/universal_map2web</a></p>
</div>
<div class="card">
<h3>Report a bug</h3>
<p><a href="https://github.com/geomatic-web/universal_map2web/issues">Open an issue</a></p>
</div>
<div class="card">
<h3>Phone</h3>
<p>+226 64 41 25 14</p>
</div>
</div>
</div>
</main>
</div>
<footer>
<p>© 2026 Jean-Baptiste KIBORA | Universal Map2web - Licensed under GPL v2</p>
<p>Version 1.2.1</p>
</footer>
<script>
// Ouverture/fermeture de la sidebar sur mobile
const toggleBtn = document.getElementById('mobileToggle');
const sidebar = document.getElementById('sidebar');
toggleBtn.addEventListener('click', () => {
sidebar.classList.toggle('open');
});
sidebar.querySelectorAll('a').forEach(link => {
link.addEventListener('click', () => sidebar.classList.remove('open'));
});
// Surlignage du lien actif selon la section visible
const links = Array.from(sidebar.querySelectorAll('a'));
const sections = links
.map(link => document.querySelector(link.getAttribute('href')))
.filter(Boolean);
const setActive = () => {
let currentId = sections[0] ? sections[0].id : null;
const scrollPos = window.scrollY + 120;
sections.forEach(section => {
if (section.offsetTop <= scrollPos) {
currentId = section.id;
}
});
links.forEach(link => {
link.classList.toggle('active', link.getAttribute('href') === '#' + currentId);
});
};
document.addEventListener('scroll', setActive, { passive: true });
window.addEventListener('load', setActive);
</script>
</body>
</html>