@htmlbricks/hb-map 0.65.13 → 0.65.17

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/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": [
@@ -262,6 +290,9 @@
262
290
  },
263
291
  "type": "object"
264
292
  },
293
+ "screenshot": {
294
+ "type": "string"
295
+ },
265
296
  "source": {
266
297
  "additionalProperties": false,
267
298
  "properties": {
@@ -323,11 +354,19 @@
323
354
  "type": "object"
324
355
  }
325
356
  },
357
+ "screenshot": {
358
+ "control": {
359
+ "type": "text"
360
+ }
361
+ },
326
362
  "pointClickCoordinates": {
327
363
  "action": "pointClickCoordinates"
328
364
  },
329
365
  "markerClick": {
330
366
  "action": "markerClick"
367
+ },
368
+ "screenshotTaken": {
369
+ "action": "screenshotTaken"
331
370
  }
332
371
  },
333
372
  "styleSetup": {
@@ -441,6 +480,160 @@
441
480
  }
442
481
  ]
443
482
  }
483
+ },
484
+ {
485
+ "name": "markerWithText",
486
+ "description": "Markers with text labels in all 4 positions around the icon",
487
+ "data": {
488
+ "center": [
489
+ 10,
490
+ 10
491
+ ],
492
+ "zoom": 11,
493
+ "source": {
494
+ "type": "osm"
495
+ },
496
+ "options": {
497
+ "centerFromGeometries": true
498
+ },
499
+ "data": [
500
+ {
501
+ "marker": {
502
+ "lngLat": [
503
+ 10,
504
+ 10
505
+ ],
506
+ "icon": {
507
+ "uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
508
+ "scale": 0.15,
509
+ "anchor": [
510
+ 0.5,
511
+ 0.5
512
+ ]
513
+ },
514
+ "text": "Right (default)"
515
+ }
516
+ },
517
+ {
518
+ "marker": {
519
+ "lngLat": [
520
+ 10.05,
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": "Left",
532
+ "text_position": "left"
533
+ }
534
+ },
535
+ {
536
+ "marker": {
537
+ "lngLat": [
538
+ 10,
539
+ 9.97
540
+ ],
541
+ "icon": {
542
+ "uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
543
+ "scale": 0.15,
544
+ "anchor": [
545
+ 0.5,
546
+ 0.5
547
+ ]
548
+ },
549
+ "text": "Top",
550
+ "text_position": "top"
551
+ }
552
+ },
553
+ {
554
+ "marker": {
555
+ "lngLat": [
556
+ 10.05,
557
+ 9.97
558
+ ],
559
+ "icon": {
560
+ "uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
561
+ "scale": 0.15,
562
+ "anchor": [
563
+ 0.5,
564
+ 0.5
565
+ ]
566
+ },
567
+ "text": "Bottom",
568
+ "text_position": "bottom"
569
+ }
570
+ },
571
+ {
572
+ "marker": {
573
+ "lngLat": [
574
+ 10.025,
575
+ 9.985
576
+ ],
577
+ "icon": {
578
+ "uri": "https://upload.wikimedia.org/wikipedia/commons/4/4b/Visual_Studio_Code_Insiders_1.36_icon.svg",
579
+ "scale": 0.15,
580
+ "anchor": [
581
+ 0.5,
582
+ 0.5
583
+ ]
584
+ },
585
+ "text": "Custom gap (20px)",
586
+ "text_position": "right",
587
+ "text_offset": 20
588
+ }
589
+ }
590
+ ]
591
+ }
592
+ },
593
+ {
594
+ "name": "textOnly",
595
+ "description": "Markers with text only (no icon)",
596
+ "data": {
597
+ "center": [
598
+ 10,
599
+ 10
600
+ ],
601
+ "zoom": 9,
602
+ "source": {
603
+ "type": "osm"
604
+ },
605
+ "options": {
606
+ "centerFromGeometries": true
607
+ },
608
+ "data": [
609
+ {
610
+ "marker": {
611
+ "lngLat": [
612
+ 10,
613
+ 10
614
+ ],
615
+ "text": "Text only (no icon)"
616
+ }
617
+ }
618
+ ]
619
+ }
620
+ },
621
+ {
622
+ "name": "screenshot",
623
+ "description": "Set screenshot to 'yes' to capture the map as base64 via the screenshotTaken event",
624
+ "data": {
625
+ "center": [
626
+ 10,
627
+ 10
628
+ ],
629
+ "zoom": 9,
630
+ "source": {
631
+ "type": "osm"
632
+ },
633
+ "options": {},
634
+ "screenshot": "yes",
635
+ "data": []
636
+ }
444
637
  }
445
638
  ],
446
639
  "screenshots": [],
@@ -461,5 +654,5 @@
461
654
  "size": {},
462
655
  "iifePath": "main.iife.js",
463
656
  "repoName": "@htmlbricks/hb-map",
464
- "version": "0.65.13"
657
+ "version": "0.65.17"
465
658
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-map",
3
- "version": "0.65.13",
3
+ "version": "0.65.17",
4
4
  "contributors": [],
5
5
  "description": "",
6
6
  "licenses": [
@@ -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": [
@@ -179,6 +194,9 @@
179
194
  },
180
195
  "type": "object"
181
196
  },
197
+ "screenshot": {
198
+ "type": "string"
199
+ },
182
200
  "source": {
183
201
  "additionalProperties": false,
184
202
  "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[];
@@ -43,6 +46,7 @@ export type Component = {
43
46
  }[];
44
47
  source: { type: string; url?: string };
45
48
  options: { centerFromGeometries?: boolean };
49
+ screenshot?: string;
46
50
  };
47
51
 
48
52
  export type Events = {
@@ -55,4 +59,7 @@ export type Events = {
55
59
  coordinates: { latitude: number; longitude: number };
56
60
  id: string;
57
61
  };
62
+ screenshotTaken: {
63
+ base64: string;
64
+ };
58
65
  };
@@ -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
  }