@rio-cloud/uikit-mcp 1.1.8 → 1.1.10

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.
Files changed (210) hide show
  1. package/README.md +17 -7
  2. package/dist/doc-metadata.json +325 -85
  3. package/dist/docs/components/accentBar.md +110 -116
  4. package/dist/docs/components/activity.md +1 -1
  5. package/dist/docs/components/analyticsAnalysisOverlay.md +628 -0
  6. package/dist/docs/components/animatedNumber.md +2 -2
  7. package/dist/docs/components/animatedTextReveal.md +53 -55
  8. package/dist/docs/components/animations.md +22 -22
  9. package/dist/docs/components/appHeader.md +27 -38
  10. package/dist/docs/components/appLayout.md +38 -42
  11. package/dist/docs/components/appNavigationBar.md +1 -1
  12. package/dist/docs/components/areaCharts.md +57 -63
  13. package/dist/docs/components/aspectRatioPlaceholder.md +1 -1
  14. package/dist/docs/components/assetTree.md +200 -167
  15. package/dist/docs/components/autosuggests.md +1 -1
  16. package/dist/docs/components/avatar.md +1 -1
  17. package/dist/docs/components/banner.md +2 -2
  18. package/dist/docs/components/barCharts.md +531 -417
  19. package/dist/docs/components/barList.md +9 -9
  20. package/dist/docs/components/basicMap.md +60 -39
  21. package/dist/docs/components/bottomSheet.md +2 -2
  22. package/dist/docs/components/button.md +8 -2
  23. package/dist/docs/components/buttonToolbar.md +1 -1
  24. package/dist/docs/components/calendarStripe.md +57 -65
  25. package/dist/docs/components/card.md +1 -1
  26. package/dist/docs/components/carousel.md +1 -1
  27. package/dist/docs/components/chartColors.md +1 -3
  28. package/dist/docs/components/chartsGettingStarted.md +1 -3
  29. package/dist/docs/components/chat.md +2 -2
  30. package/dist/docs/components/checkbox.md +15 -12
  31. package/dist/docs/components/circularProgress.md +8 -8
  32. package/dist/docs/components/clearableInput.md +1 -1
  33. package/dist/docs/components/collapse.md +2 -4
  34. package/dist/docs/components/composedCharts.md +63 -53
  35. package/dist/docs/components/contentLoader.md +1 -1
  36. package/dist/docs/components/dataTabs.md +33 -33
  37. package/dist/docs/components/datepickers.md +693 -687
  38. package/dist/docs/components/dayPicker.md +5574 -0
  39. package/dist/docs/components/dayPickerCalendar.md +5269 -0
  40. package/dist/docs/components/dialogs.md +17 -19
  41. package/dist/docs/components/divider.md +1 -1
  42. package/dist/docs/components/dropdowns.md +3252 -3276
  43. package/dist/docs/components/editableContent.md +91 -91
  44. package/dist/docs/components/expander.md +4 -1
  45. package/dist/docs/components/fade.md +1 -1
  46. package/dist/docs/components/fadeExpander.md +1 -1
  47. package/dist/docs/components/fadeUp.md +32 -36
  48. package/dist/docs/components/feedback.md +1 -1
  49. package/dist/docs/components/filePickers.md +1 -1
  50. package/dist/docs/components/formLabel.md +29 -31
  51. package/dist/docs/components/groupedItemList.md +3 -7
  52. package/dist/docs/components/htmlTable.md +5074 -0
  53. package/dist/docs/components/iconList.md +4 -4
  54. package/dist/docs/components/imagePreloader.md +1 -1
  55. package/dist/docs/components/labeledElement.md +1 -1
  56. package/dist/docs/components/licensePlate.md +1 -1
  57. package/dist/docs/components/lineCharts.md +172 -172
  58. package/dist/docs/components/listMenu.md +15 -12
  59. package/dist/docs/components/loadMore.md +4 -2
  60. package/dist/docs/components/mainNavigation.md +1 -1
  61. package/dist/docs/components/mapCircle.md +10 -1
  62. package/dist/docs/components/mapCluster.md +23 -1
  63. package/dist/docs/components/mapContext.md +12 -4
  64. package/dist/docs/components/mapDraggableMarker.md +12 -1
  65. package/dist/docs/components/mapGettingStarted.md +1 -1
  66. package/dist/docs/components/mapInfoBubble.md +129 -2
  67. package/dist/docs/components/mapLayerGroup.md +10 -1
  68. package/dist/docs/components/mapMarker.md +10 -3
  69. package/dist/docs/components/mapPolygon.md +288 -85
  70. package/dist/docs/components/mapRoute.md +262 -172
  71. package/dist/docs/components/mapRouteGenerator.md +1 -1
  72. package/dist/docs/components/mapSettings.md +23 -1
  73. package/dist/docs/components/mapUtils.md +1 -1
  74. package/dist/docs/components/multiselects.md +211 -18
  75. package/dist/docs/components/noData.md +1 -1
  76. package/dist/docs/components/notifications.md +2 -2
  77. package/dist/docs/components/numbercontrol.md +15 -15
  78. package/dist/docs/components/onboarding.md +1 -1
  79. package/dist/docs/components/page.md +1 -1
  80. package/dist/docs/components/pager.md +1 -1
  81. package/dist/docs/components/pieCharts.md +237 -213
  82. package/dist/docs/components/popover.md +1 -1
  83. package/dist/docs/components/position.md +1 -1
  84. package/dist/docs/components/radialBarCharts.md +446 -400
  85. package/dist/docs/components/radioCardGroup.md +1 -1
  86. package/dist/docs/components/radiobutton.md +96 -98
  87. package/dist/docs/components/releaseNotes.md +1 -1
  88. package/dist/docs/components/resizer.md +1 -3
  89. package/dist/docs/components/responsiveColumnStripe.md +1 -3
  90. package/dist/docs/components/responsiveVideo.md +1 -1
  91. package/dist/docs/components/rioglyph.md +1 -1
  92. package/dist/docs/components/rules.md +41 -47
  93. package/dist/docs/components/saveableInput.md +252 -252
  94. package/dist/docs/components/selects.md +165 -111
  95. package/dist/docs/components/sidebar.md +1 -1
  96. package/dist/docs/components/sliders.md +1 -1
  97. package/dist/docs/components/smoothScrollbars.md +19 -15
  98. package/dist/docs/components/spinners.md +1 -1
  99. package/dist/docs/components/states.md +1 -1
  100. package/dist/docs/components/statsWidgets.md +1 -1
  101. package/dist/docs/components/statusBar.md +1 -1
  102. package/dist/docs/components/stepButton.md +1 -1
  103. package/dist/docs/components/steppedProgressBars.md +9 -11
  104. package/dist/docs/components/subNavigation.md +1 -1
  105. package/dist/docs/components/supportMarker.md +1 -1
  106. package/dist/docs/components/svgImage.md +1 -1
  107. package/dist/docs/components/switch.md +3 -1
  108. package/dist/docs/components/table.md +19584 -0
  109. package/dist/docs/components/tableControls.md +982 -0
  110. package/dist/docs/components/tagManager.md +1 -1
  111. package/dist/docs/components/tags.md +1 -1
  112. package/dist/docs/components/teaser.md +1 -3
  113. package/dist/docs/components/textTruncateMiddle.md +1 -1
  114. package/dist/docs/components/timeline.md +1 -1
  115. package/dist/docs/components/timepicker.md +1 -1
  116. package/dist/docs/components/toggleButton.md +3 -1
  117. package/dist/docs/components/tooltip.md +4 -2
  118. package/dist/docs/components/tracker.md +1 -1
  119. package/dist/docs/components/virtualList.md +56 -56
  120. package/dist/docs/foundations.md +640 -3122
  121. package/dist/docs/start/changelog.md +53 -3
  122. package/dist/docs/start/goodtoknow.md +2 -4
  123. package/dist/docs/start/guidelines/color-combinations.md +1 -1
  124. package/dist/docs/start/guidelines/custom-css.md +1 -1
  125. package/dist/docs/start/guidelines/custom-rioglyph.md +1 -1
  126. package/dist/docs/start/guidelines/formatting.md +1 -3
  127. package/dist/docs/start/guidelines/iframe.md +17 -19
  128. package/dist/docs/start/guidelines/obfuscate-data.md +2 -4
  129. package/dist/docs/start/guidelines/print-css.md +1 -1
  130. package/dist/docs/start/guidelines/spinner.md +1 -1
  131. package/dist/docs/start/guidelines/state-in-url.md +1 -1
  132. package/dist/docs/start/guidelines/supported-browsers.md +1 -1
  133. package/dist/docs/start/guidelines/writing.md +1 -1
  134. package/dist/docs/start/howto.md +12 -20
  135. package/dist/docs/start/intro.md +1 -1
  136. package/dist/docs/start/responsiveness.md +1 -3
  137. package/dist/docs/templates/ai-assistant.md +311 -0
  138. package/dist/docs/templates/common-table.md +814 -0
  139. package/dist/docs/templates/detail-views.md +846 -0
  140. package/dist/docs/templates/expandable-details.md +214 -0
  141. package/dist/docs/templates/feature-cards.md +479 -0
  142. package/dist/docs/templates/form-summary.md +179 -0
  143. package/dist/docs/templates/form-toggle.md +329 -0
  144. package/dist/docs/templates/list-blocks.md +872 -0
  145. package/dist/docs/templates/loading-progress.md +100 -0
  146. package/dist/docs/templates/options-panel.md +132 -0
  147. package/dist/docs/templates/panel-variants.md +137 -0
  148. package/dist/docs/templates/progress-cards.md +541 -0
  149. package/dist/docs/templates/progress-success.md +125 -0
  150. package/dist/docs/templates/settings-form.md +401 -0
  151. package/dist/docs/templates/stats-blocks.md +1245 -0
  152. package/dist/docs/templates/table-panel.md +310 -0
  153. package/dist/docs/templates/usage-cards.md +199 -0
  154. package/dist/docs/utilities/classNames.md +1 -1
  155. package/dist/docs/utilities/deviceUtils.md +2 -2
  156. package/dist/docs/utilities/featureToggles.md +1 -1
  157. package/dist/docs/utilities/fuelTypeUtils.md +27 -29
  158. package/dist/docs/utilities/getTrackingAttributes.md +277 -0
  159. package/dist/docs/utilities/routeUtils.md +2 -2
  160. package/dist/docs/utilities/useAfterMount.md +1 -1
  161. package/dist/docs/utilities/useAutoAnimate.md +1 -1
  162. package/dist/docs/utilities/useAverage.md +1 -1
  163. package/dist/docs/utilities/useClickOutside.md +1 -1
  164. package/dist/docs/utilities/useClipboard.md +2 -2
  165. package/dist/docs/utilities/useCookies.md +1 -1
  166. package/dist/docs/utilities/useCount.md +1 -1
  167. package/dist/docs/utilities/useDarkMode.md +5 -4
  168. package/dist/docs/utilities/useDebugInfo.md +3 -3
  169. package/dist/docs/utilities/useDraggableElement.md +281 -0
  170. package/dist/docs/utilities/useEffectOnce.md +1 -1
  171. package/dist/docs/utilities/useElapsedTime.md +1 -1
  172. package/dist/docs/utilities/useElementSize.md +1 -1
  173. package/dist/docs/utilities/useEsc.md +1 -1
  174. package/dist/docs/utilities/useEvent.md +1 -1
  175. package/dist/docs/utilities/useFocusTrap.md +1 -1
  176. package/dist/docs/utilities/useFullscreen.md +1 -1
  177. package/dist/docs/utilities/useHover.md +1 -1
  178. package/dist/docs/utilities/useIncomingPostMessages.md +1 -1
  179. package/dist/docs/utilities/useInterval.md +1 -1
  180. package/dist/docs/utilities/useIsFocusWithin.md +1 -1
  181. package/dist/docs/utilities/useKey.md +8 -10
  182. package/dist/docs/utilities/useLocalStorage.md +1 -1
  183. package/dist/docs/utilities/useLocationSuggestions.md +1 -1
  184. package/dist/docs/utilities/useMax.md +1 -1
  185. package/dist/docs/utilities/useMin.md +1 -1
  186. package/dist/docs/utilities/useMutationObserver.md +1 -1
  187. package/dist/docs/utilities/useOnScreen.md +1 -1
  188. package/dist/docs/utilities/useOnlineStatus.md +1 -1
  189. package/dist/docs/utilities/usePostMessage.md +2 -2
  190. package/dist/docs/utilities/usePostMessageSender.md +1 -1
  191. package/dist/docs/utilities/usePrevious.md +2 -4
  192. package/dist/docs/utilities/useResizeObserver.md +35 -15
  193. package/dist/docs/utilities/useRioCookieConsent.md +1 -1
  194. package/dist/docs/utilities/useScrollPosition.md +3 -6
  195. package/dist/docs/utilities/useSearch.md +1 -3
  196. package/dist/docs/utilities/useSearchHighlight.md +1 -1
  197. package/dist/docs/utilities/useSorting.md +370 -239
  198. package/dist/docs/utilities/useStateWithValidation.md +1 -1
  199. package/dist/docs/utilities/useSum.md +1 -1
  200. package/dist/docs/utilities/useTableExport.md +364 -288
  201. package/dist/docs/utilities/useTableSelection.md +88 -92
  202. package/dist/docs/utilities/useTimeout.md +1 -1
  203. package/dist/docs/utilities/useToggle.md +1 -1
  204. package/dist/docs/utilities/useUrlState.md +1 -1
  205. package/dist/docs/utilities/useWindowResize.md +1 -1
  206. package/dist/index.mjs +2 -8
  207. package/dist/search-synonyms.json +2 -2
  208. package/dist/version.json +2 -2
  209. package/package.json +15 -9
  210. package/dist/docs/components/tables.md +0 -8
@@ -3,18 +3,35 @@
3
3
  *Category:* Components
4
4
  *Section:* Map
5
5
  *Source:* https://uikit.developers.rio.cloud/#/components/mapPolygon
6
- *Captured:* 2026-03-06T10:41:20.236Z
6
+ *Captured:* 2026-04-20T12:55:30.672Z
7
+
8
+ Polygons and isolines support click and hover interactions. A typical hover effect can be created by changing the outline via strokeColor and lineWidth in the hoverStyle.
7
9
 
8
10
  ## Polygon
9
11
 
10
- ### Example: Example 1
12
+ ### Example: Last map interaction
13
+
14
+ Terms of use © 1987–2026 HERE
15
+
16
+ 200 m
11
17
 
18
+ Choose view
19
+ Map view
20
+ Satellite
12
21
 
22
+ Traffic conditions
23
+ Show traffic incidents
24
+
25
+ Last map interaction
26
+ {
27
+ "clicked": "none",
28
+ "eventType": "none"
29
+ }
13
30
 
14
31
  #### React (tsx)
15
32
 
16
33
  ```tsx
17
- import { useRef } from 'react';
34
+ import { useRef, useState } from 'react';
18
35
 
19
36
  import Map from '@rio-cloud/rio-uikit/Map';
20
37
  import EventUtils from '@rio-cloud/rio-uikit/EventUtils';
@@ -26,12 +43,14 @@ import type { MapApi, MapEvent } from '@rio-cloud/rio-uikit/mapTypes';
26
43
  import { UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT } from '../uikit_demo_credentials';
27
44
  import SingleMapMarker from '@rio-cloud/rio-uikit/SingleMapMarker';
28
45
  import Marker from '@rio-cloud/rio-uikit/Marker';
46
+ import { PolygonEventDebug, getPolygonEventDebugData, type PolygonEventDebugData } from './PolygonEventDebug';
29
47
 
30
48
  const STROKE_COLOR = colorMapMarker['color-map-marker-geofence'].stroke;
31
49
  const FILL_COLOR = colorMapMarker['color-map-marker-geofence'].fill;
32
50
 
33
51
  export default () => {
34
52
  const mapApiRef = useRef<MapApi>();
53
+ const [eventData, setEventData] = useState<PolygonEventDebugData>();
35
54
 
36
55
  const position = { lat: 48.18009710294023, lng: 11.595117182551355 };
37
56
 
@@ -58,76 +77,240 @@ export default () => {
58
77
  },
59
78
  ];
60
79
 
61
- const eventListenerMap = {
62
- [EventUtils.TAP]: (event: MapEvent) => {
63
- console.log(event);
80
+ const createTapHandler = (clicked: string) => (event: MapEvent) =>
81
+ setEventData(getPolygonEventDebugData(clicked, event, mapApiRef.current));
64
82
 
65
- // biome-ignore lint/suspicious/noExplicitAny: we don't specify here which target element it might be
66
- const target = event.target as any;
67
- console.log({ boundingBox: target.getBoundingBox(), geometry: target.getGeometry() });
83
+ return (
84
+ <>
85
+ <Map
86
+ credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
87
+ center={position}
88
+ zoom={15}
89
+ height={300}
90
+ mapSettings={
91
+ <MapSettings
92
+ options={[
93
+ <MapTypeSettings
94
+ key='mapTypeSettings'
95
+ tooltip='Change map type'
96
+ dropdownHeaderText='Map views'
97
+ defaultTypeLabel='Default view'
98
+ truckTypeLabel='Truck view'
99
+ terrainTypeLabel='Terrain view'
100
+ satelliteTypeLabel='Satellite view'
101
+ nightTypeLabel='Night view'
102
+ />,
103
+ ]}
104
+ />
105
+ }
106
+ >
107
+ {(api: MapApi) => {
108
+ mapApiRef.current = api;
68
109
 
69
- console.log({
70
- viewport: mapApiRef.current?.utils?.getViewPort(),
71
- baseLayer: mapApiRef.current?.utils?.getBaseLayer(),
72
- mapBoundingBox: mapApiRef.current?.utils?.getBounds(),
73
- center: mapApiRef.current?.utils?.getCenter(),
74
- zoom: mapApiRef.current?.utils?.getZoom(),
75
- layers: mapApiRef.current?.utils?.getLayers(),
76
- });
77
- },
110
+ const polygonStyle = { strokeColor: STROKE_COLOR, fillColor: FILL_COLOR } as H.map.SpatialStyle;
111
+
112
+ return (
113
+ <>
114
+ <Polygon
115
+ points={points}
116
+ style={polygonStyle}
117
+ eventListenerMap={{ [EventUtils.TAP]: createTapHandler('polygon') }}
118
+ />
119
+ <Marker
120
+ position={{ lat: 48.18, lng: 11.5951 }}
121
+ icon={
122
+ <SingleMapMarker
123
+ name='Gefoence'
124
+ iconNames={['geofence']}
125
+ markerColor='bg-map-marker-geofence'
126
+ />
127
+ }
128
+ eventListenerMap={{ [EventUtils.TAP]: createTapHandler('marker') }}
129
+ />
130
+ </>
131
+ );
132
+ }}
133
+ </Map>
134
+ <PolygonEventDebug eventData={eventData} />
135
+ </>
136
+ );
137
+ };
138
+ ```
139
+
140
+ #### Props: Polygon
141
+
142
+ ### Polygon
143
+
144
+ | Name | Type | Default | Description |
145
+ | --- | --- | --- | --- |
146
+ | points | PolygonPoints | — | Ordered geographic positions that define the polygon geometry. |
147
+ | style | PolygonStyle | H.map.SpatialStyle.DEFAULT_STYLE | Visual style applied to the polygon. |
148
+ | hoverStyle | PolygonStyle | — | Style overrides applied while the polygon is hovered. |
149
+ | eventListenerMap | EventListenerMap | — | Event handlers attached to the polygon. |
150
+ | cursor | CSSProperties['cursor'] | — | Cursor shown while hovering the polygon. If omitted, clickable polygons automatically use pointer. |
151
+
152
+ ## Clickable polygons and isolines
153
+
154
+ ### Example: geofence
155
+
156
+ Terms of use © 1987–2026 HERE
157
+
158
+ 200 m
159
+
160
+ Choose view
161
+ Map view
162
+ Satellite
163
+
164
+ Traffic conditions
165
+ Show traffic incidents
166
+
167
+ Active polygon: geofence
168
+ Last map interaction
169
+ {
170
+ "clicked": "none",
171
+ "eventType": "none"
172
+ }
173
+
174
+ #### React (tsx)
175
+
176
+ ```tsx
177
+ import { useRef, useState } from 'react';
178
+
179
+ import Map from '@rio-cloud/rio-uikit/Map';
180
+ import EventUtils from '@rio-cloud/rio-uikit/EventUtils';
181
+ import Polygon, { colorMapMarker, colorMapWarmup } from '@rio-cloud/rio-uikit/Polygon';
182
+ import MapSettings from '@rio-cloud/rio-uikit/MapSettings';
183
+ import MapTypeSettings from '@rio-cloud/rio-uikit/MapTypeSettings';
184
+ import Notification from '@rio-cloud/rio-uikit/Notification';
185
+ import type { MapApi, MapEvent } from '@rio-cloud/rio-uikit/mapTypes';
186
+
187
+ import { UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT } from '../uikit_demo_credentials';
188
+ import { PolygonEventDebug, getPolygonEventDebugData, type PolygonEventDebugData } from './PolygonEventDebug';
189
+
190
+ const geofencePoints = [
191
+ { lat: 48.1842, lng: 11.5923 },
192
+ { lat: 48.1824, lng: 11.5981 },
193
+ { lat: 48.1778, lng: 11.5968 },
194
+ { lat: 48.1786, lng: 11.5904 },
195
+ ];
196
+
197
+ const isolinePoints = [
198
+ { lat: 48.1862, lng: 11.6017 },
199
+ { lat: 48.1836, lng: 11.6072 },
200
+ { lat: 48.1798, lng: 11.6064 },
201
+ { lat: 48.1774, lng: 11.6019 },
202
+ { lat: 48.1805, lng: 11.5984 },
203
+ { lat: 48.1844, lng: 11.5989 },
204
+ ];
205
+
206
+ const position = { lat: 48.18009710294023, lng: 11.599117182551355 };
207
+
208
+ type PolygonId = 'geofence' | 'isoline';
209
+
210
+ export default () => {
211
+ const mapApiRef = useRef<MapApi>();
212
+ const [activePolygonId, setActivePolygonId] = useState<PolygonId>('geofence');
213
+ const [eventData, setEventData] = useState<PolygonEventDebugData>();
214
+
215
+ const createTapHandler = (polygonId: PolygonId) => (event: MapEvent) => {
216
+ event.stopPropagation();
217
+ setActivePolygonId(polygonId);
218
+ setEventData(getPolygonEventDebugData(polygonId, event, mapApiRef.current));
219
+ Notification.info(`${polygonId === 'geofence' ? 'Geofence' : 'Isoline'} clicked`);
78
220
  };
79
221
 
80
222
  return (
81
- <Map
82
- credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
83
- center={position}
84
- zoom={15}
85
- height={300}
86
- mapSettings={
87
- <MapSettings
88
- options={[
89
- <MapTypeSettings
90
- key='mapTypeSettings'
91
- tooltip='Change map type'
92
- dropdownHeaderText='Map views'
93
- defaultTypeLabel='Default view'
94
- truckTypeLabel='Truck view'
95
- terrainTypeLabel='Terrain view'
96
- satelliteTypeLabel='Satellite view'
97
- nightTypeLabel='Night view'
98
- />,
99
- ]}
100
- />
101
- }
102
- >
103
- {(api: MapApi) => {
104
- mapApiRef.current = api;
105
-
106
- const polygonStyle = { strokeColor: STROKE_COLOR, fillColor: FILL_COLOR } as H.map.SpatialStyle;
107
-
108
- return (
109
- <>
110
- <Polygon points={points} style={polygonStyle} eventListenerMap={eventListenerMap} />
111
- <Marker
112
- position={{ lat: 48.18, lng: 11.5951 }}
113
- icon={
114
- <SingleMapMarker
115
- name='Gefoence'
116
- iconNames={['geofence']}
117
- markerColor='bg-map-marker-geofence'
118
- />
119
- }
120
- eventListenerMap={eventListenerMap}
121
- />
122
- </>
123
- );
124
- }}
125
- </Map>
223
+ <>
224
+ <Map
225
+ credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
226
+ center={position}
227
+ zoom={15}
228
+ height={320}
229
+ mapSettings={
230
+ <MapSettings
231
+ options={[
232
+ <MapTypeSettings
233
+ key='mapTypeSettings'
234
+ tooltip='Change map type'
235
+ dropdownHeaderText='Map views'
236
+ defaultTypeLabel='Default view'
237
+ truckTypeLabel='Truck view'
238
+ terrainTypeLabel='Terrain view'
239
+ satelliteTypeLabel='Satellite view'
240
+ nightTypeLabel='Night view'
241
+ />,
242
+ ]}
243
+ />
244
+ }
245
+ >
246
+ {(api: MapApi) => {
247
+ mapApiRef.current = api;
248
+
249
+ return (
250
+ <>
251
+ <Polygon
252
+ points={geofencePoints}
253
+ style={{
254
+ strokeColor:
255
+ activePolygonId === 'geofence'
256
+ ? colorMapWarmup['color-warmup-salmon'].stroke
257
+ : colorMapMarker['color-map-marker-geofence'].stroke,
258
+ fillColor: colorMapMarker['color-map-marker-geofence'].fill,
259
+ lineWidth: activePolygonId === 'geofence' ? 4 : 2,
260
+ }}
261
+ hoverStyle={{
262
+ strokeColor: colorMapWarmup['color-warmup-cherokee'].stroke,
263
+ lineWidth: 5,
264
+ }}
265
+ eventListenerMap={{
266
+ [EventUtils.TAP]: createTapHandler('geofence'),
267
+ }}
268
+ />
269
+ <Polygon
270
+ points={isolinePoints}
271
+ style={{
272
+ strokeColor:
273
+ activePolygonId === 'isoline'
274
+ ? colorMapWarmup['color-warmup-cherokee'].stroke
275
+ : colorMapWarmup['color-warmup-salmon'].stroke,
276
+ fillColor: 'rgba(255, 255, 255, 0)',
277
+ lineWidth: activePolygonId === 'isoline' ? 4 : 3,
278
+ lineDash: [4, 2],
279
+ }}
280
+ hoverStyle={{
281
+ strokeColor: colorMapMarker['color-map-marker-poi'].stroke,
282
+ lineWidth: 4,
283
+ }}
284
+ eventListenerMap={{
285
+ [EventUtils.TAP]: createTapHandler('isoline'),
286
+ }}
287
+ />
288
+ </>
289
+ );
290
+ }}
291
+ </Map>
292
+ <div className='margin-top-15'>
293
+ Active polygon: <strong>{activePolygonId}</strong>
294
+ </div>
295
+ <PolygonEventDebug eventData={eventData} />
296
+ </>
126
297
  );
127
298
  };
128
299
  ```
129
300
 
130
- ### Example: Example 2
301
+ #### Props: Polygon
302
+
303
+ ### Polygon
304
+
305
+ | Name | Type | Default | Description |
306
+ | --- | --- | --- | --- |
307
+ | points | PolygonPoints | — | Ordered geographic positions that define the polygon geometry. |
308
+ | style | PolygonStyle | H.map.SpatialStyle.DEFAULT_STYLE | Visual style applied to the polygon. |
309
+ | hoverStyle | PolygonStyle | — | Style overrides applied while the polygon is hovered. |
310
+ | eventListenerMap | EventListenerMap | — | Event handlers attached to the polygon. |
311
+ | cursor | CSSProperties['cursor'] | — | Cursor shown while hovering the polygon. If omitted, clickable polygons automatically use pointer. |
312
+
313
+ ### Example: Last map interaction
131
314
 
132
315
  Color color-warmup-salmon Coldplay
133
316
  color-coldplay-wine
@@ -197,6 +380,23 @@ color-highlight-lighter
197
380
  color-highlight-lightest
198
381
  color-highlight-decent
199
382
 
383
+ Terms of use © 1987–2026 HERE
384
+
385
+ 50 km
386
+
387
+ Choose view
388
+ Map view
389
+ Satellite
390
+
391
+ Traffic conditions
392
+ Show traffic incidents
393
+
394
+ Last map interaction
395
+ {
396
+ "clicked": "none",
397
+ "eventType": "none"
398
+ }
399
+
200
400
  #### React (tsx)
201
401
 
202
402
  ```tsx
@@ -222,6 +422,7 @@ import Polygon, {
222
422
  import Select, { type SelectOption } from '@rio-cloud/rio-uikit/Select';
223
423
 
224
424
  import { UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT } from '../uikit_demo_credentials';
425
+ import { PolygonEventDebug, getPolygonEventDebugData, type PolygonEventDebugData } from './PolygonEventDebug';
225
426
 
226
427
  type HeaderOption = {
227
428
  id: string;
@@ -270,6 +471,7 @@ const colorOptions: ColorOptions = [
270
471
 
271
472
  export default () => {
272
473
  const mapApiRef = useRef<MapApi>();
474
+ const [eventData, setEventData] = useState<PolygonEventDebugData>();
273
475
 
274
476
  const [currentColor, setCurrentColor] = useState('color-warmup-salmon');
275
477
 
@@ -277,24 +479,8 @@ export default () => {
277
479
 
278
480
  const points = isoline.points;
279
481
 
280
- const eventListenerMap = {
281
- [EventUtils.TAP]: (event: MapEvent) => {
282
- console.log(event);
283
-
284
- // biome-ignore lint/suspicious/noExplicitAny: we don't specify here which target element it might be
285
- const target = event.target as any;
286
- console.log({ boundingBox: target.getBoundingBox(), geometry: target.getGeometry() });
287
-
288
- console.log({
289
- viewport: mapApiRef.current?.utils?.getViewPort(),
290
- baseLayer: mapApiRef.current?.utils?.getBaseLayer(),
291
- mapBoundingBox: mapApiRef.current?.utils?.getBounds(),
292
- center: mapApiRef.current?.utils?.getCenter(),
293
- zoom: mapApiRef.current?.utils?.getZoom(),
294
- layers: mapApiRef.current?.utils?.getLayers(),
295
- });
296
- },
297
- };
482
+ const createTapHandler = (clicked: string) => (event: MapEvent) =>
483
+ setEventData(getPolygonEventDebugData(clicked, event, mapApiRef.current));
298
484
 
299
485
  const handleSelectedColor = (item: SelectOption | undefined) => setCurrentColor(item?.id || '');
300
486
 
@@ -338,7 +524,11 @@ export default () => {
338
524
 
339
525
  return (
340
526
  <>
341
- <Polygon points={points} style={polygonStyle} eventListenerMap={eventListenerMap} />
527
+ <Polygon
528
+ points={points}
529
+ style={polygonStyle}
530
+ eventListenerMap={{ [EventUtils.TAP]: createTapHandler('isoline polygon') }}
531
+ />
342
532
  <Marker
343
533
  position={{ lat: 48.18, lng: 11.5951 }}
344
534
  icon={
@@ -348,12 +538,13 @@ export default () => {
348
538
  clickable={false}
349
539
  />
350
540
  }
351
- eventListenerMap={eventListenerMap}
541
+ eventListenerMap={{ [EventUtils.TAP]: createTapHandler('poi marker') }}
352
542
  />
353
543
  </>
354
544
  );
355
545
  }}
356
546
  </Map>
547
+ <PolygonEventDebug eventData={eventData} />
357
548
  </div>
358
549
  );
359
550
  };
@@ -838,4 +1029,16 @@ const isoline = {
838
1029
  },
839
1030
  ],
840
1031
  };
841
- ```
1032
+ ```
1033
+
1034
+ #### Props: Polygon
1035
+
1036
+ ### Polygon
1037
+
1038
+ | Name | Type | Default | Description |
1039
+ | --- | --- | --- | --- |
1040
+ | points | PolygonPoints | — | Ordered geographic positions that define the polygon geometry. |
1041
+ | style | PolygonStyle | H.map.SpatialStyle.DEFAULT_STYLE | Visual style applied to the polygon. |
1042
+ | hoverStyle | PolygonStyle | — | Style overrides applied while the polygon is hovered. |
1043
+ | eventListenerMap | EventListenerMap | — | Event handlers attached to the polygon. |
1044
+ | cursor | CSSProperties['cursor'] | — | Cursor shown while hovering the polygon. If omitted, clickable polygons automatically use pointer. |