@htmlbricks/hb-map 0.65.16 → 0.65.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.iife.js +9 -9
- package/main.iife.js.map +1 -1
- package/manifest.json +248 -2
- package/package.json +1 -1
- package/types/webcomponent.type.d.json +33 -0
- package/types/webcomponent.type.d.ts +13 -1
- package/types/webcomponent_events.type.d.json +14 -1
package/manifest.json
CHANGED
|
@@ -71,11 +71,24 @@
|
|
|
71
71
|
"center"
|
|
72
72
|
],
|
|
73
73
|
"type": "object"
|
|
74
|
+
},
|
|
75
|
+
"screenshotTaken": {
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"base64": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"base64"
|
|
84
|
+
],
|
|
85
|
+
"type": "object"
|
|
74
86
|
}
|
|
75
87
|
},
|
|
76
88
|
"required": [
|
|
77
89
|
"pointClickCoordinates",
|
|
78
|
-
"markerClick"
|
|
90
|
+
"markerClick",
|
|
91
|
+
"screenshotTaken"
|
|
79
92
|
],
|
|
80
93
|
"type": "object"
|
|
81
94
|
}
|
|
@@ -190,6 +203,21 @@
|
|
|
190
203
|
},
|
|
191
204
|
"popupHtml": {
|
|
192
205
|
"type": "string"
|
|
206
|
+
},
|
|
207
|
+
"text": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
"text_offset": {
|
|
211
|
+
"type": "number"
|
|
212
|
+
},
|
|
213
|
+
"text_position": {
|
|
214
|
+
"enum": [
|
|
215
|
+
"top",
|
|
216
|
+
"right",
|
|
217
|
+
"bottom",
|
|
218
|
+
"left"
|
|
219
|
+
],
|
|
220
|
+
"type": "string"
|
|
193
221
|
}
|
|
194
222
|
},
|
|
195
223
|
"required": [
|
|
@@ -258,10 +286,28 @@
|
|
|
258
286
|
"properties": {
|
|
259
287
|
"centerFromGeometries": {
|
|
260
288
|
"type": "boolean"
|
|
289
|
+
},
|
|
290
|
+
"text_offset": {
|
|
291
|
+
"type": "number"
|
|
292
|
+
},
|
|
293
|
+
"text_position": {
|
|
294
|
+
"enum": [
|
|
295
|
+
"top",
|
|
296
|
+
"right",
|
|
297
|
+
"bottom",
|
|
298
|
+
"left"
|
|
299
|
+
],
|
|
300
|
+
"type": "string"
|
|
301
|
+
},
|
|
302
|
+
"text_scale": {
|
|
303
|
+
"type": "number"
|
|
261
304
|
}
|
|
262
305
|
},
|
|
263
306
|
"type": "object"
|
|
264
307
|
},
|
|
308
|
+
"screenshot": {
|
|
309
|
+
"type": "string"
|
|
310
|
+
},
|
|
265
311
|
"source": {
|
|
266
312
|
"additionalProperties": false,
|
|
267
313
|
"properties": {
|
|
@@ -323,11 +369,19 @@
|
|
|
323
369
|
"type": "object"
|
|
324
370
|
}
|
|
325
371
|
},
|
|
372
|
+
"screenshot": {
|
|
373
|
+
"control": {
|
|
374
|
+
"type": "text"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
326
377
|
"pointClickCoordinates": {
|
|
327
378
|
"action": "pointClickCoordinates"
|
|
328
379
|
},
|
|
329
380
|
"markerClick": {
|
|
330
381
|
"action": "markerClick"
|
|
382
|
+
},
|
|
383
|
+
"screenshotTaken": {
|
|
384
|
+
"action": "screenshotTaken"
|
|
331
385
|
}
|
|
332
386
|
},
|
|
333
387
|
"styleSetup": {
|
|
@@ -441,6 +495,198 @@
|
|
|
441
495
|
}
|
|
442
496
|
]
|
|
443
497
|
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "markerWithText",
|
|
501
|
+
"description": "Markers with text using global options for position and offset",
|
|
502
|
+
"data": {
|
|
503
|
+
"center": [
|
|
504
|
+
10,
|
|
505
|
+
10
|
|
506
|
+
],
|
|
507
|
+
"zoom": 11,
|
|
508
|
+
"source": {
|
|
509
|
+
"type": "osm"
|
|
510
|
+
},
|
|
511
|
+
"options": {
|
|
512
|
+
"centerFromGeometries": true,
|
|
513
|
+
"text_position": "right",
|
|
514
|
+
"text_offset": 8
|
|
515
|
+
},
|
|
516
|
+
"data": [
|
|
517
|
+
{
|
|
518
|
+
"marker": {
|
|
519
|
+
"lngLat": [
|
|
520
|
+
10,
|
|
521
|
+
10
|
|
522
|
+
],
|
|
523
|
+
"icon": {
|
|
524
|
+
"uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
|
|
525
|
+
"scale": 0.15,
|
|
526
|
+
"anchor": [
|
|
527
|
+
0.5,
|
|
528
|
+
0.5
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"text": "Uses global (right)"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"marker": {
|
|
536
|
+
"lngLat": [
|
|
537
|
+
10.05,
|
|
538
|
+
10
|
|
539
|
+
],
|
|
540
|
+
"icon": {
|
|
541
|
+
"uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
|
|
542
|
+
"scale": 0.15,
|
|
543
|
+
"anchor": [
|
|
544
|
+
0.5,
|
|
545
|
+
0.5
|
|
546
|
+
]
|
|
547
|
+
},
|
|
548
|
+
"text": "Override: left",
|
|
549
|
+
"text_position": "left"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"marker": {
|
|
554
|
+
"lngLat": [
|
|
555
|
+
10,
|
|
556
|
+
9.97
|
|
557
|
+
],
|
|
558
|
+
"icon": {
|
|
559
|
+
"uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
|
|
560
|
+
"scale": 0.15,
|
|
561
|
+
"anchor": [
|
|
562
|
+
0.5,
|
|
563
|
+
0.5
|
|
564
|
+
]
|
|
565
|
+
},
|
|
566
|
+
"text": "Override: top",
|
|
567
|
+
"text_position": "top"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"marker": {
|
|
572
|
+
"lngLat": [
|
|
573
|
+
10.05,
|
|
574
|
+
9.97
|
|
575
|
+
],
|
|
576
|
+
"icon": {
|
|
577
|
+
"uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
|
|
578
|
+
"scale": 0.15,
|
|
579
|
+
"anchor": [
|
|
580
|
+
0.5,
|
|
581
|
+
0.5
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
"text": "Override: bottom",
|
|
585
|
+
"text_position": "bottom"
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"marker": {
|
|
590
|
+
"lngLat": [
|
|
591
|
+
10.025,
|
|
592
|
+
9.985
|
|
593
|
+
],
|
|
594
|
+
"icon": {
|
|
595
|
+
"uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
|
|
596
|
+
"scale": 0.15,
|
|
597
|
+
"anchor": [
|
|
598
|
+
0.5,
|
|
599
|
+
0.5
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
"text": "Override: gap 20px",
|
|
603
|
+
"text_offset": 20
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "markerWithLargeText",
|
|
611
|
+
"description": "Markers with scaled up text (text_scale: 1.5)",
|
|
612
|
+
"data": {
|
|
613
|
+
"center": [
|
|
614
|
+
10,
|
|
615
|
+
10
|
|
616
|
+
],
|
|
617
|
+
"zoom": 11,
|
|
618
|
+
"source": {
|
|
619
|
+
"type": "osm"
|
|
620
|
+
},
|
|
621
|
+
"options": {
|
|
622
|
+
"centerFromGeometries": true,
|
|
623
|
+
"text_scale": 1.5
|
|
624
|
+
},
|
|
625
|
+
"data": [
|
|
626
|
+
{
|
|
627
|
+
"marker": {
|
|
628
|
+
"lngLat": [
|
|
629
|
+
10,
|
|
630
|
+
10
|
|
631
|
+
],
|
|
632
|
+
"icon": {
|
|
633
|
+
"uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
|
|
634
|
+
"scale": 0.15,
|
|
635
|
+
"anchor": [
|
|
636
|
+
0.5,
|
|
637
|
+
0.5
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
"text": "Large text"
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
]
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"name": "textOnly",
|
|
648
|
+
"description": "Markers with text only (no icon)",
|
|
649
|
+
"data": {
|
|
650
|
+
"center": [
|
|
651
|
+
10,
|
|
652
|
+
10
|
|
653
|
+
],
|
|
654
|
+
"zoom": 9,
|
|
655
|
+
"source": {
|
|
656
|
+
"type": "osm"
|
|
657
|
+
},
|
|
658
|
+
"options": {
|
|
659
|
+
"centerFromGeometries": true
|
|
660
|
+
},
|
|
661
|
+
"data": [
|
|
662
|
+
{
|
|
663
|
+
"marker": {
|
|
664
|
+
"lngLat": [
|
|
665
|
+
10,
|
|
666
|
+
10
|
|
667
|
+
],
|
|
668
|
+
"text": "Text only (no icon)"
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
]
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "screenshot",
|
|
676
|
+
"description": "Set screenshot to 'yes' to capture the map as base64 via the screenshotTaken event",
|
|
677
|
+
"data": {
|
|
678
|
+
"center": [
|
|
679
|
+
10,
|
|
680
|
+
10
|
|
681
|
+
],
|
|
682
|
+
"zoom": 9,
|
|
683
|
+
"source": {
|
|
684
|
+
"type": "osm"
|
|
685
|
+
},
|
|
686
|
+
"options": {},
|
|
687
|
+
"screenshot": "yes",
|
|
688
|
+
"data": []
|
|
689
|
+
}
|
|
444
690
|
}
|
|
445
691
|
],
|
|
446
692
|
"screenshots": [],
|
|
@@ -461,5 +707,5 @@
|
|
|
461
707
|
"size": {},
|
|
462
708
|
"iifePath": "main.iife.js",
|
|
463
709
|
"repoName": "@htmlbricks/hb-map",
|
|
464
|
-
"version": "0.65.
|
|
710
|
+
"version": "0.65.18"
|
|
465
711
|
}
|
package/package.json
CHANGED
|
@@ -107,6 +107,21 @@
|
|
|
107
107
|
},
|
|
108
108
|
"popupHtml": {
|
|
109
109
|
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"text": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
"text_offset": {
|
|
115
|
+
"type": "number"
|
|
116
|
+
},
|
|
117
|
+
"text_position": {
|
|
118
|
+
"enum": [
|
|
119
|
+
"top",
|
|
120
|
+
"right",
|
|
121
|
+
"bottom",
|
|
122
|
+
"left"
|
|
123
|
+
],
|
|
124
|
+
"type": "string"
|
|
110
125
|
}
|
|
111
126
|
},
|
|
112
127
|
"required": [
|
|
@@ -175,10 +190,28 @@
|
|
|
175
190
|
"properties": {
|
|
176
191
|
"centerFromGeometries": {
|
|
177
192
|
"type": "boolean"
|
|
193
|
+
},
|
|
194
|
+
"text_offset": {
|
|
195
|
+
"type": "number"
|
|
196
|
+
},
|
|
197
|
+
"text_position": {
|
|
198
|
+
"enum": [
|
|
199
|
+
"top",
|
|
200
|
+
"right",
|
|
201
|
+
"bottom",
|
|
202
|
+
"left"
|
|
203
|
+
],
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"text_scale": {
|
|
207
|
+
"type": "number"
|
|
178
208
|
}
|
|
179
209
|
},
|
|
180
210
|
"type": "object"
|
|
181
211
|
},
|
|
212
|
+
"screenshot": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
182
215
|
"source": {
|
|
183
216
|
"additionalProperties": false,
|
|
184
217
|
"properties": {
|
|
@@ -15,6 +15,9 @@ export type Component = {
|
|
|
15
15
|
};
|
|
16
16
|
id?: string;
|
|
17
17
|
popupHtml?: string;
|
|
18
|
+
text?: string;
|
|
19
|
+
text_position?: "top" | "right" | "bottom" | "left";
|
|
20
|
+
text_offset?: number;
|
|
18
21
|
};
|
|
19
22
|
point?: {
|
|
20
23
|
lngLat: number[];
|
|
@@ -42,7 +45,13 @@ export type Component = {
|
|
|
42
45
|
}[];
|
|
43
46
|
}[];
|
|
44
47
|
source: { type: string; url?: string };
|
|
45
|
-
options: {
|
|
48
|
+
options: {
|
|
49
|
+
centerFromGeometries?: boolean;
|
|
50
|
+
text_position?: "top" | "right" | "bottom" | "left";
|
|
51
|
+
text_offset?: number;
|
|
52
|
+
text_scale?: number;
|
|
53
|
+
};
|
|
54
|
+
screenshot?: string;
|
|
46
55
|
};
|
|
47
56
|
|
|
48
57
|
export type Events = {
|
|
@@ -55,4 +64,7 @@ export type Events = {
|
|
|
55
64
|
coordinates: { latitude: number; longitude: number };
|
|
56
65
|
id: string;
|
|
57
66
|
};
|
|
67
|
+
screenshotTaken: {
|
|
68
|
+
base64: string;
|
|
69
|
+
};
|
|
58
70
|
};
|
|
@@ -69,11 +69,24 @@
|
|
|
69
69
|
"center"
|
|
70
70
|
],
|
|
71
71
|
"type": "object"
|
|
72
|
+
},
|
|
73
|
+
"screenshotTaken": {
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"properties": {
|
|
76
|
+
"base64": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [
|
|
81
|
+
"base64"
|
|
82
|
+
],
|
|
83
|
+
"type": "object"
|
|
72
84
|
}
|
|
73
85
|
},
|
|
74
86
|
"required": [
|
|
75
87
|
"pointClickCoordinates",
|
|
76
|
-
"markerClick"
|
|
88
|
+
"markerClick",
|
|
89
|
+
"screenshotTaken"
|
|
77
90
|
],
|
|
78
91
|
"type": "object"
|
|
79
92
|
}
|