@rio-cloud/uikit-mcp 1.0.0 → 1.1.0
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/README.md +75 -40
- package/dist/doc-metadata.json +1872 -0
- package/dist/docs/components/accentBar.md +582 -0
- package/dist/docs/components/activity.md +330 -0
- package/dist/docs/components/animatedNumber.md +88 -0
- package/dist/docs/components/animatedTextReveal.md +381 -0
- package/dist/docs/components/animations.md +459 -0
- package/dist/docs/components/appHeader.md +737 -0
- package/dist/docs/components/appLayout.md +2016 -0
- package/dist/docs/components/appNavigationBar.md +274 -0
- package/dist/docs/components/areaCharts.md +828 -0
- package/dist/docs/components/aspectRatioPlaceholder.md +106 -0
- package/dist/docs/components/assetTree.md +3223 -0
- package/dist/docs/components/autosuggests.md +1177 -0
- package/dist/docs/components/avatar.md +206 -0
- package/dist/docs/components/banner.md +668 -0
- package/dist/docs/components/barCharts.md +2785 -0
- package/dist/docs/components/barList.md +517 -0
- package/dist/docs/components/basicMap.md +167 -0
- package/dist/docs/components/bottomSheet.md +721 -0
- package/dist/docs/components/button.md +775 -0
- package/dist/docs/components/buttonToolbar.md +134 -0
- package/dist/docs/components/calendarStripe.md +525 -0
- package/dist/docs/components/card.md +86 -0
- package/dist/docs/components/carousel.md +128 -0
- package/dist/docs/components/chartColors.md +716 -0
- package/dist/docs/components/chartsGettingStarted.md +28 -0
- package/dist/docs/components/chat.md +932 -0
- package/dist/docs/components/checkbox.md +996 -0
- package/dist/docs/components/clearableInput.md +806 -0
- package/dist/docs/components/collapse.md +189 -0
- package/dist/docs/components/composedCharts.md +424 -0
- package/dist/docs/components/contentLoader.md +674 -0
- package/dist/docs/components/dataTabs.md +1251 -0
- package/dist/docs/components/datepickers.md +2543 -0
- package/dist/docs/components/dialogs.md +2244 -0
- package/dist/docs/components/divider.md +219 -0
- package/dist/docs/components/dropdowns.md +17550 -0
- package/dist/docs/components/editableContent.md +1127 -0
- package/dist/docs/components/expander.md +970 -0
- package/dist/docs/components/fade.md +836 -0
- package/dist/docs/components/fadeExpander.md +180 -0
- package/dist/docs/components/fadeUp.md +396 -0
- package/dist/docs/components/feedback.md +758 -0
- package/dist/docs/components/filePickers.md +370 -0
- package/dist/docs/components/formLabel.md +251 -0
- package/dist/docs/components/fullscreenMap.md +10 -0
- package/dist/docs/components/groupedItemList.md +1001 -0
- package/dist/docs/components/iconList.md +306 -0
- package/dist/docs/components/imagePreloader.md +167 -0
- package/dist/docs/components/labeledElement.md +115 -0
- package/dist/docs/components/licensePlate.md +412 -0
- package/dist/docs/components/lineCharts.md +2014 -0
- package/dist/docs/components/listMenu.md +392 -0
- package/dist/docs/components/loadMore.md +219 -0
- package/dist/docs/components/mainNavigation.md +129 -0
- package/dist/docs/components/mapCircle.md +93 -0
- package/dist/docs/components/mapCluster.md +337 -0
- package/dist/docs/components/mapContext.md +284 -0
- package/dist/docs/components/mapDraggableMarker.md +150 -0
- package/dist/docs/components/mapGettingStarted.md +39 -0
- package/dist/docs/components/mapInfoBubble.md +135 -0
- package/dist/docs/components/mapLayerGroup.md +94 -0
- package/dist/docs/components/mapMarker.md +1814 -0
- package/dist/docs/components/mapPolygon.md +959 -0
- package/dist/docs/components/mapRoute.md +3816 -0
- package/dist/docs/components/mapRouteGenerator.md +6 -0
- package/dist/docs/components/mapSettings.md +1040 -0
- package/dist/docs/components/mapUtils.md +132 -0
- package/dist/docs/components/multiselects.md +1921 -0
- package/dist/docs/components/noData.md +210 -0
- package/dist/docs/components/notifications.md +314 -0
- package/dist/docs/components/numbercontrol.md +706 -0
- package/dist/docs/components/onboarding.md +297 -0
- package/dist/docs/components/page.md +241 -0
- package/dist/docs/components/pager.md +133 -0
- package/dist/docs/components/pieCharts.md +1284 -0
- package/dist/docs/components/popover.md +222 -0
- package/dist/docs/components/position.md +50 -0
- package/dist/docs/components/radialBarCharts.md +3663 -0
- package/dist/docs/components/radiobutton.md +1271 -0
- package/dist/docs/components/releaseNotes.md +135 -0
- package/dist/docs/components/resizer.md +162 -0
- package/dist/docs/components/responsiveColumnStripe.md +435 -0
- package/dist/docs/components/responsiveVideo.md +71 -0
- package/dist/docs/components/rioglyph.md +331 -0
- package/dist/docs/components/rules.md +965 -0
- package/dist/docs/components/saveableInput.md +1721 -0
- package/dist/docs/components/selects.md +1993 -0
- package/dist/docs/components/sidebar.md +332 -0
- package/dist/docs/components/sliders.md +376 -0
- package/dist/docs/components/smoothScrollbars.md +1180 -0
- package/dist/docs/components/spinners.md +506 -0
- package/dist/docs/components/states.md +1176 -0
- package/dist/docs/components/statsWidgets.md +636 -0
- package/dist/docs/components/statusBar.md +644 -0
- package/dist/docs/components/stepButton.md +61 -0
- package/dist/docs/components/steppedProgressBars.md +1064 -0
- package/dist/docs/components/subNavigation.md +470 -0
- package/dist/docs/components/supportMarker.md +115 -0
- package/dist/docs/components/svgImage.md +248 -0
- package/dist/docs/components/switch.md +554 -0
- package/dist/docs/components/tables.md +8 -0
- package/dist/docs/components/tagManager.md +476 -0
- package/dist/docs/components/tags.md +785 -0
- package/dist/docs/components/teaser.md +925 -0
- package/dist/docs/components/timeline.md +514 -0
- package/dist/docs/components/timepicker.md +262 -0
- package/dist/docs/components/toggleButton.md +178 -0
- package/dist/docs/components/tooltip.md +454 -0
- package/dist/docs/components/virtualList.md +483 -0
- package/dist/docs/foundations.md +20901 -0
- package/dist/docs/start/changelog.md +439 -0
- package/dist/docs/start/goodtoknow.md +14 -0
- package/dist/docs/start/guidelines/color-combinations.md +678 -0
- package/dist/docs/start/guidelines/custom-css.md +42 -0
- package/dist/docs/start/guidelines/custom-rioglyph.md +35 -0
- package/dist/docs/start/guidelines/formatting.md +587 -0
- package/dist/docs/start/guidelines/iframe.md +323 -0
- package/dist/docs/start/guidelines/obfuscate-data.md +30 -0
- package/dist/docs/start/guidelines/print-css.md +36 -0
- package/dist/docs/start/guidelines/spinner.md +710 -0
- package/dist/docs/start/guidelines/supported-browsers.md +10 -0
- package/dist/docs/start/guidelines/writing.md +635 -0
- package/dist/docs/start/howto.md +187 -0
- package/dist/docs/start/intro.md +43 -0
- package/dist/docs/start/responsiveness.md +98 -0
- package/dist/docs/templates/common-table.md +1111 -0
- package/dist/docs/templates/detail-views.md +942 -0
- package/dist/docs/templates/expandable-details.md +228 -0
- package/dist/docs/templates/feature-cards.md +549 -0
- package/dist/docs/templates/form-summary.md +199 -0
- package/dist/docs/templates/form-toggle.md +367 -0
- package/dist/docs/templates/list-blocks.md +1021 -0
- package/dist/docs/templates/loading-progress.md +109 -0
- package/dist/docs/templates/options-panel.md +152 -0
- package/dist/docs/templates/panel-variants.md +164 -0
- package/dist/docs/templates/progress-cards.md +607 -0
- package/dist/docs/templates/progress-success.md +142 -0
- package/dist/docs/templates/settings-form.md +434 -0
- package/dist/docs/templates/stats-blocks.md +1381 -0
- package/dist/docs/templates/table-panel.md +184 -0
- package/dist/docs/templates/table-row-animation.md +317 -0
- package/dist/docs/templates/usage-cards.md +227 -0
- package/dist/docs/utilities/deviceUtils.md +123 -0
- package/dist/docs/utilities/featureToggles.md +90 -0
- package/dist/docs/utilities/fuelTypeUtils.md +186 -0
- package/dist/docs/utilities/routeUtils.md +138 -0
- package/dist/docs/utilities/useAfterMount.md +66 -0
- package/dist/docs/utilities/useAutoAnimate.md +193 -0
- package/dist/docs/utilities/useAverage.md +95 -0
- package/dist/docs/utilities/useClickOutside.md +61 -0
- package/dist/docs/utilities/useClipboard.md +93 -0
- package/dist/docs/utilities/useCount.md +178 -0
- package/dist/docs/utilities/useDarkMode.md +49 -0
- package/dist/docs/utilities/useDebugInfo.md +126 -0
- package/dist/docs/utilities/useEffectOnce.md +58 -0
- package/dist/docs/utilities/useElapsedTime.md +58 -0
- package/dist/docs/utilities/useElementSize.md +71 -0
- package/dist/docs/utilities/useEsc.md +58 -0
- package/dist/docs/utilities/useEvent.md +64 -0
- package/dist/docs/utilities/useFocusTrap.md +85 -0
- package/dist/docs/utilities/useFullscreen.md +198 -0
- package/dist/docs/utilities/useHover.md +55 -0
- package/dist/docs/utilities/useIncomingPostMessages.md +237 -0
- package/dist/docs/utilities/useInterval.md +85 -0
- package/dist/docs/utilities/useIsFocusWithin.md +114 -0
- package/dist/docs/utilities/useKey.md +151 -0
- package/dist/docs/utilities/useLocalStorage.md +91 -0
- package/dist/docs/utilities/useLocationSuggestions.md +114 -0
- package/dist/docs/utilities/useMax.md +62 -0
- package/dist/docs/utilities/useMin.md +78 -0
- package/dist/docs/utilities/useMutationObserver.md +113 -0
- package/dist/docs/utilities/useOnScreen.md +138 -0
- package/dist/docs/utilities/useOnlineStatus.md +49 -0
- package/dist/docs/utilities/usePostMessage.md +117 -0
- package/dist/docs/utilities/usePostMessageSender.md +257 -0
- package/dist/docs/utilities/usePrevious.md +101 -0
- package/dist/docs/utilities/useResizeObserver.md +151 -0
- package/dist/docs/utilities/useScrollPosition.md +252 -0
- package/dist/docs/utilities/useSearch.md +228 -0
- package/dist/docs/utilities/useSorting.md +389 -0
- package/dist/docs/utilities/useStateWithValidation.md +83 -0
- package/dist/docs/utilities/useSum.md +155 -0
- package/dist/docs/utilities/useTableExport.md +404 -0
- package/dist/docs/utilities/useTableSelection.md +1120 -0
- package/dist/docs/utilities/useTimeout.md +55 -0
- package/dist/docs/utilities/useToggle.md +115 -0
- package/dist/docs/utilities/useWindowResize.md +70 -0
- package/dist/index.mjs +271 -0
- package/dist/search-synonyms.json +134 -0
- package/dist/version.json +4 -0
- package/package.json +23 -19
- package/bin/uikit-mcp.mjs +0 -23
- package/data/pages/Components/components/accentbar.json +0 -207
- package/data/pages/Components/components/activity.json +0 -87
- package/data/pages/Components/components/animatednumber.json +0 -99
- package/data/pages/Components/components/animations.json +0 -87
- package/data/pages/Components/components/appheader.json +0 -291
- package/data/pages/Components/components/applayout.json +0 -1198
- package/data/pages/Components/components/appnavigationbar.json +0 -327
- package/data/pages/Components/components/areacharts.json +0 -563
- package/data/pages/Components/components/aspectratioplaceholder.json +0 -75
- package/data/pages/Components/components/assettree.json +0 -3080
- package/data/pages/Components/components/autosuggests.json +0 -710
- package/data/pages/Components/components/avatar.json +0 -157
- package/data/pages/Components/components/banner.json +0 -599
- package/data/pages/Components/components/barcharts.json +0 -1507
- package/data/pages/Components/components/barlist.json +0 -223
- package/data/pages/Components/components/basicmap.json +0 -68
- package/data/pages/Components/components/bottomsheet.json +0 -601
- package/data/pages/Components/components/button.json +0 -583
- package/data/pages/Components/components/buttontoolbar.json +0 -63
- package/data/pages/Components/components/calendarstripe.json +0 -235
- package/data/pages/Components/components/card.json +0 -69
- package/data/pages/Components/components/carousel.json +0 -39
- package/data/pages/Components/components/chartcolors.json +0 -34
- package/data/pages/Components/components/chartsgettingstarted.json +0 -32
- package/data/pages/Components/components/chat.json +0 -39
- package/data/pages/Components/components/checkbox.json +0 -847
- package/data/pages/Components/components/clearableinput.json +0 -789
- package/data/pages/Components/components/collapse.json +0 -175
- package/data/pages/Components/components/composedcharts.json +0 -159
- package/data/pages/Components/components/contentloader.json +0 -233
- package/data/pages/Components/components/datatabs.json +0 -680
- package/data/pages/Components/components/datepickers.json +0 -287
- package/data/pages/Components/components/dialogs.json +0 -1492
- package/data/pages/Components/components/divider.json +0 -93
- package/data/pages/Components/components/dropdowns.json +0 -936
- package/data/pages/Components/components/editablecontent.json +0 -1117
- package/data/pages/Components/components/expander.json +0 -377
- package/data/pages/Components/components/fade.json +0 -403
- package/data/pages/Components/components/fadeexpander.json +0 -75
- package/data/pages/Components/components/fadeup.json +0 -127
- package/data/pages/Components/components/feedback.json +0 -269
- package/data/pages/Components/components/filepickers.json +0 -269
- package/data/pages/Components/components/formlabel.json +0 -115
- package/data/pages/Components/components/fullscreenmap.json +0 -22
- package/data/pages/Components/components/groupeditemlist.json +0 -323
- package/data/pages/Components/components/iconlist.json +0 -45
- package/data/pages/Components/components/imagepreloader.json +0 -81
- package/data/pages/Components/components/labeledelement.json +0 -75
- package/data/pages/Components/components/licenseplate.json +0 -69
- package/data/pages/Components/components/linecharts.json +0 -987
- package/data/pages/Components/components/listmenu.json +0 -313
- package/data/pages/Components/components/loadmore.json +0 -175
- package/data/pages/Components/components/mainnavigation.json +0 -39
- package/data/pages/Components/components/mapcircle.json +0 -34
- package/data/pages/Components/components/mapcluster.json +0 -51
- package/data/pages/Components/components/mapcontext.json +0 -105
- package/data/pages/Components/components/mapdraggablemarker.json +0 -34
- package/data/pages/Components/components/mapgettingstarted.json +0 -27
- package/data/pages/Components/components/mapgroup.json +0 -1198
- package/data/pages/Components/components/mapinfobubble.json +0 -34
- package/data/pages/Components/components/maplayergroup.json +0 -34
- package/data/pages/Components/components/mapmarker.json +0 -700
- package/data/pages/Components/components/mappolygon.json +0 -45
- package/data/pages/Components/components/maproute.json +0 -623
- package/data/pages/Components/components/maproutegenerator.json +0 -16
- package/data/pages/Components/components/mapsettings.json +0 -51
- package/data/pages/Components/components/maputils.json +0 -34
- package/data/pages/Components/components/multiselects.json +0 -1451
- package/data/pages/Components/components/nodata.json +0 -139
- package/data/pages/Components/components/notifications.json +0 -65
- package/data/pages/Components/components/numbercontrol.json +0 -301
- package/data/pages/Components/components/onboarding.json +0 -302
- package/data/pages/Components/components/page.json +0 -197
- package/data/pages/Components/components/pager.json +0 -93
- package/data/pages/Components/components/piecharts.json +0 -731
- package/data/pages/Components/components/popover.json +0 -251
- package/data/pages/Components/components/position.json +0 -69
- package/data/pages/Components/components/radialbarcharts.json +0 -1304
- package/data/pages/Components/components/radiobutton.json +0 -1105
- package/data/pages/Components/components/releasenotes.json +0 -44
- package/data/pages/Components/components/resizer.json +0 -93
- package/data/pages/Components/components/responsivecolumnstripe.json +0 -123
- package/data/pages/Components/components/responsivevideo.json +0 -75
- package/data/pages/Components/components/rioglyph.json +0 -93
- package/data/pages/Components/components/rules.json +0 -410
- package/data/pages/Components/components/saveableinput.json +0 -703
- package/data/pages/Components/components/selects.json +0 -701
- package/data/pages/Components/components/sidebar.json +0 -243
- package/data/pages/Components/components/sliders.json +0 -235
- package/data/pages/Components/components/smoothscrollbars.json +0 -335
- package/data/pages/Components/components/spinners.json +0 -343
- package/data/pages/Components/components/states.json +0 -1705
- package/data/pages/Components/components/statswidgets.json +0 -314
- package/data/pages/Components/components/statusbar.json +0 -177
- package/data/pages/Components/components/stepbutton.json +0 -57
- package/data/pages/Components/components/steppedprogressbars.json +0 -417
- package/data/pages/Components/components/subnavigation.json +0 -107
- package/data/pages/Components/components/supportmarker.json +0 -45
- package/data/pages/Components/components/svgimage.json +0 -81
- package/data/pages/Components/components/switch.json +0 -111
- package/data/pages/Components/components/tables.json +0 -144
- package/data/pages/Components/components/tagmanager.json +0 -86
- package/data/pages/Components/components/tags.json +0 -146
- package/data/pages/Components/components/teaser.json +0 -188
- package/data/pages/Components/components/timeline.json +0 -45
- package/data/pages/Components/components/timepicker.json +0 -163
- package/data/pages/Components/components/togglebutton.json +0 -247
- package/data/pages/Components/components/tooltip.json +0 -270
- package/data/pages/Components/components/virtuallist.json +0 -175
- package/data/pages/Foundations/foundations.json +0 -2475
- package/data/pages/Getting-started/start/changelog.json +0 -22
- package/data/pages/Getting-started/start/goodtoknow.json +0 -32
- package/data/pages/Getting-started/start/guidelines/color-combinations.json +0 -58
- package/data/pages/Getting-started/start/guidelines/custom-css.json +0 -27
- package/data/pages/Getting-started/start/guidelines/custom-rioglyph.json +0 -22
- package/data/pages/Getting-started/start/guidelines/formatting.json +0 -97
- package/data/pages/Getting-started/start/guidelines/iframe.json +0 -93
- package/data/pages/Getting-started/start/guidelines/obfuscate-data.json +0 -22
- package/data/pages/Getting-started/start/guidelines/print-css.json +0 -37
- package/data/pages/Getting-started/start/guidelines/spinner.json +0 -144
- package/data/pages/Getting-started/start/guidelines/supported-browsers.json +0 -22
- package/data/pages/Getting-started/start/guidelines/writing.json +0 -242
- package/data/pages/Getting-started/start/howto.json +0 -72
- package/data/pages/Getting-started/start/intro.json +0 -37
- package/data/pages/Getting-started/start/responsiveness.json +0 -52
- package/data/pages/Templates/templates/common-table.json +0 -39
- package/data/pages/Templates/templates/detail-views.json +0 -71
- package/data/pages/Templates/templates/expandable-details.json +0 -39
- package/data/pages/Templates/templates/feature-cards.json +0 -103
- package/data/pages/Templates/templates/form-summary.json +0 -39
- package/data/pages/Templates/templates/form-toggle.json +0 -39
- package/data/pages/Templates/templates/list-blocks.json +0 -119
- package/data/pages/Templates/templates/loading-progress.json +0 -39
- package/data/pages/Templates/templates/options-panel.json +0 -39
- package/data/pages/Templates/templates/panel-variants.json +0 -39
- package/data/pages/Templates/templates/progress-cards.json +0 -71
- package/data/pages/Templates/templates/progress-success.json +0 -39
- package/data/pages/Templates/templates/settings-form.json +0 -39
- package/data/pages/Templates/templates/stats-blocks.json +0 -135
- package/data/pages/Templates/templates/table-panel.json +0 -39
- package/data/pages/Templates/templates/table-row-animation.json +0 -39
- package/data/pages/Templates/templates/usage-cards.json +0 -39
- package/data/pages/Utilities/utilities/deviceutils.json +0 -39
- package/data/pages/Utilities/utilities/featuretoggles.json +0 -42
- package/data/pages/Utilities/utilities/fueltypeutils.json +0 -118
- package/data/pages/Utilities/utilities/routeutils.json +0 -34
- package/data/pages/Utilities/utilities/useaftermount.json +0 -63
- package/data/pages/Utilities/utilities/useaverage.json +0 -86
- package/data/pages/Utilities/utilities/useclickoutside.json +0 -69
- package/data/pages/Utilities/utilities/useclipboard.json +0 -57
- package/data/pages/Utilities/utilities/usecount.json +0 -92
- package/data/pages/Utilities/utilities/usedarkmode.json +0 -50
- package/data/pages/Utilities/utilities/usedebuginfo.json +0 -63
- package/data/pages/Utilities/utilities/useeffectonce.json +0 -57
- package/data/pages/Utilities/utilities/useelapsedtime.json +0 -57
- package/data/pages/Utilities/utilities/useelementsize.json +0 -63
- package/data/pages/Utilities/utilities/useesc.json +0 -57
- package/data/pages/Utilities/utilities/useevent.json +0 -75
- package/data/pages/Utilities/utilities/usefocustrap.json +0 -57
- package/data/pages/Utilities/utilities/usefullscreen.json +0 -197
- package/data/pages/Utilities/utilities/usehover.json +0 -57
- package/data/pages/Utilities/utilities/useinterval.json +0 -63
- package/data/pages/Utilities/utilities/useisfocuswithin.json +0 -75
- package/data/pages/Utilities/utilities/usekey.json +0 -75
- package/data/pages/Utilities/utilities/uselocalstorage.json +0 -69
- package/data/pages/Utilities/utilities/uselocationsuggestions.json +0 -110
- package/data/pages/Utilities/utilities/usemax.json +0 -86
- package/data/pages/Utilities/utilities/usemin.json +0 -86
- package/data/pages/Utilities/utilities/usemutationobserver.json +0 -69
- package/data/pages/Utilities/utilities/useonlinestatus.json +0 -39
- package/data/pages/Utilities/utilities/useonscreen.json +0 -63
- package/data/pages/Utilities/utilities/usepostmessage.json +0 -80
- package/data/pages/Utilities/utilities/useprevious.json +0 -63
- package/data/pages/Utilities/utilities/useresizeobserver.json +0 -65
- package/data/pages/Utilities/utilities/usescrollposition.json +0 -103
- package/data/pages/Utilities/utilities/usesearch.json +0 -197
- package/data/pages/Utilities/utilities/usesorting.json +0 -139
- package/data/pages/Utilities/utilities/usestatewithvalidation.json +0 -69
- package/data/pages/Utilities/utilities/usesum.json +0 -86
- package/data/pages/Utilities/utilities/usetableexport.json +0 -87
- package/data/pages/Utilities/utilities/usetableselection.json +0 -311
- package/data/pages/Utilities/utilities/usetimeout.json +0 -63
- package/data/pages/Utilities/utilities/usetoggle.json +0 -75
- package/data/pages/Utilities/utilities/usewindowresize.json +0 -63
- package/data/version.json +0 -4
- package/docs/content-schema.md +0 -147
- package/docs/navigation-inventory.json +0 -1310
- package/docs/search-synonyms.json +0 -43
- package/server/index.mjs +0 -268
- package/server/lib/load-docs.mjs +0 -48
- package/server/lib/normalise-doc.mjs +0 -220
- package/server/lib/render-markdown.mjs +0 -82
- package/server/lib/search-index.mjs +0 -49
- package/server/lib/types.js +0 -99
|
@@ -0,0 +1,1040 @@
|
|
|
1
|
+
# Map settings
|
|
2
|
+
|
|
3
|
+
*Category:* Components
|
|
4
|
+
*Section:* Map
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#components/mapSettings
|
|
6
|
+
*Captured:* 2025-12-12T12:39:09.858Z
|
|
7
|
+
|
|
8
|
+
## Map settings
|
|
9
|
+
|
|
10
|
+
### Example: Example 1
|
|
11
|
+
|
|
12
|
+
Terms of use© 1987–2025 HERE
|
|
13
|
+
|
|
14
|
+
20 km
|
|
15
|
+
|
|
16
|
+
Choose view
|
|
17
|
+
Map view
|
|
18
|
+
Satellite
|
|
19
|
+
|
|
20
|
+
Traffic conditions
|
|
21
|
+
Show traffic incidents
|
|
22
|
+
|
|
23
|
+
Map TypeDayDay
|
|
24
|
+
Fleet style
|
|
25
|
+
Satellite
|
|
26
|
+
Terrain
|
|
27
|
+
Night
|
|
28
|
+
|
|
29
|
+
Map LayerPlease select...Incidents
|
|
30
|
+
Traffic
|
|
31
|
+
Road restrictions
|
|
32
|
+
|
|
33
|
+
LanguageEnglishEnglish
|
|
34
|
+
German
|
|
35
|
+
Polish
|
|
36
|
+
|
|
37
|
+
Zoom
|
|
38
|
+
|
|
39
|
+
Min zoom
|
|
40
|
+
|
|
41
|
+
Max zoom
|
|
42
|
+
|
|
43
|
+
Map centerReset position
|
|
44
|
+
|
|
45
|
+
ClusterShow cluster
|
|
46
|
+
RenderingWebGL vector tiles
|
|
47
|
+
Use device pixel ratio
|
|
48
|
+
|
|
49
|
+
Map centerN48° 30.000′ E12° 6.000′
|
|
50
|
+
|
|
51
|
+
#### Summary
|
|
52
|
+
|
|
53
|
+
Terms of use© 1987–2025 HERE
|
|
54
|
+
|
|
55
|
+
20 km
|
|
56
|
+
|
|
57
|
+
Choose view
|
|
58
|
+
Map view
|
|
59
|
+
Satellite
|
|
60
|
+
|
|
61
|
+
Traffic conditions
|
|
62
|
+
Show traffic incidents
|
|
63
|
+
|
|
64
|
+
Map TypeDayDay
|
|
65
|
+
Fleet style
|
|
66
|
+
Satellite
|
|
67
|
+
Terrain
|
|
68
|
+
Night
|
|
69
|
+
|
|
70
|
+
Map LayerPlease select...Incidents
|
|
71
|
+
Traffic
|
|
72
|
+
Road restrictions
|
|
73
|
+
|
|
74
|
+
LanguageEnglishEnglish
|
|
75
|
+
German
|
|
76
|
+
Polish
|
|
77
|
+
|
|
78
|
+
Zoom
|
|
79
|
+
|
|
80
|
+
Min zoom
|
|
81
|
+
|
|
82
|
+
Max zoom
|
|
83
|
+
|
|
84
|
+
Map centerReset position
|
|
85
|
+
|
|
86
|
+
ClusterShow cluster
|
|
87
|
+
RenderingWebGL vector tiles
|
|
88
|
+
Use device pixel ratio
|
|
89
|
+
|
|
90
|
+
Map centerN48° 30.000′ E12° 6.000′
|
|
91
|
+
|
|
92
|
+
#### React (tsx)
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
import type React from 'react';
|
|
96
|
+
import { useState, useRef, useMemo } from 'react';
|
|
97
|
+
import { isEqual, without } from 'es-toolkit/compat';
|
|
98
|
+
|
|
99
|
+
import classNames from 'classnames';
|
|
100
|
+
|
|
101
|
+
import Notification from '@rio-cloud/rio-uikit/Notification';
|
|
102
|
+
// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
|
|
103
|
+
import Map from '@rio-cloud/rio-uikit/Map';
|
|
104
|
+
import Polygon from '@rio-cloud/rio-uikit/Polygon';
|
|
105
|
+
import Route from '@rio-cloud/rio-uikit/Route';
|
|
106
|
+
import Circle from '@rio-cloud/rio-uikit/Circle';
|
|
107
|
+
import Marker from '@rio-cloud/rio-uikit/Marker';
|
|
108
|
+
import InfoBubble from '@rio-cloud/rio-uikit/InfoBubble';
|
|
109
|
+
import SingleMapMarker from '@rio-cloud/rio-uikit/SingleMapMarker';
|
|
110
|
+
import ClusterMapMarker from '@rio-cloud/rio-uikit/ClusterMapMarker';
|
|
111
|
+
import MarkerLayer from '@rio-cloud/rio-uikit/MarkerLayer';
|
|
112
|
+
import EventUtils, { type EventListenerMap } from '@rio-cloud/rio-uikit/EventUtils';
|
|
113
|
+
import MapSettings from '@rio-cloud/rio-uikit/MapSettings';
|
|
114
|
+
import MapSettingsItem from '@rio-cloud/rio-uikit/MapSettingsItem';
|
|
115
|
+
import MapClusterSettings from '@rio-cloud/rio-uikit/MapClusterSettings';
|
|
116
|
+
import MapLayerSettings from '@rio-cloud/rio-uikit/MapLayerSettings';
|
|
117
|
+
import MapAdditionalLayerSettings from '@rio-cloud/rio-uikit/MapAdditionalLayerSettings';
|
|
118
|
+
import MapTypeSettings from '@rio-cloud/rio-uikit/MapTypeSettings';
|
|
119
|
+
import MapSettingsDropdownHeader from '@rio-cloud/rio-uikit/MapSettingsDropdownHeader';
|
|
120
|
+
import MapCustomerPoiSettingsItem from '@rio-cloud/rio-uikit/MapCustomerPoiSettingsItem';
|
|
121
|
+
import MapWorkshopPoiSettingsItem from '@rio-cloud/rio-uikit/MapWorkshopPoiSettingsItem';
|
|
122
|
+
import MapLayerIncidentsItem from '@rio-cloud/rio-uikit/MapLayerIncidentsItem';
|
|
123
|
+
import MapLayerRoadRestrictionsItem from '@rio-cloud/rio-uikit/MapLayerRoadRestrictionsItem';
|
|
124
|
+
import MapLayerTrafficItem from '@rio-cloud/rio-uikit/MapLayerTrafficItem';
|
|
125
|
+
import MapBoundingBoxButton from '@rio-cloud/rio-uikit/MapBoundingBoxButton';
|
|
126
|
+
import MapCenterMarkerButton from '@rio-cloud/rio-uikit/MapCenterMarkerButton';
|
|
127
|
+
import MapLockMarkerButton from '@rio-cloud/rio-uikit/MapLockMarkerButton';
|
|
128
|
+
import Select, { type SelectOption } from '@rio-cloud/rio-uikit/Select';
|
|
129
|
+
import Multiselect from '@rio-cloud/rio-uikit/Multiselect';
|
|
130
|
+
import Checkbox from '@rio-cloud/rio-uikit/Checkbox';
|
|
131
|
+
import NumberControl from '@rio-cloud/rio-uikit/NumberControl';
|
|
132
|
+
import Position from '@rio-cloud/rio-uikit/Position';
|
|
133
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
134
|
+
import type {
|
|
135
|
+
MapApi,
|
|
136
|
+
MapEvent,
|
|
137
|
+
MapIncidents,
|
|
138
|
+
MapLayer,
|
|
139
|
+
MapType,
|
|
140
|
+
Position as MapPosition,
|
|
141
|
+
IncidentDataPoint,
|
|
142
|
+
} from '@rio-cloud/rio-uikit/mapTypes';
|
|
143
|
+
|
|
144
|
+
import { UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT } from '../uikit_demo_credentials';
|
|
145
|
+
|
|
146
|
+
import {
|
|
147
|
+
markerPosition,
|
|
148
|
+
polygonPoints,
|
|
149
|
+
STROKE_COLOR,
|
|
150
|
+
FILL_COLOR,
|
|
151
|
+
routePoints,
|
|
152
|
+
circlePosition,
|
|
153
|
+
generateClusterData,
|
|
154
|
+
type Asset,
|
|
155
|
+
} from './demoData';
|
|
156
|
+
import {
|
|
157
|
+
DEFAULT_MAX_ZOOM,
|
|
158
|
+
DEFAULT_MIN_ZOOM,
|
|
159
|
+
MAP_LAYER_INCIDENTS,
|
|
160
|
+
} from '@rio-cloud/rio-uikit/components/map/components/constants';
|
|
161
|
+
|
|
162
|
+
const WORKSHOP_POIS = 'WORKSHOP_POIS';
|
|
163
|
+
const CUSTOMER_POIS = 'CUSTOMER_POIS';
|
|
164
|
+
const GEOFENCES = 'GEOFENCES';
|
|
165
|
+
const CHARGING_STATIONS = 'CHARGING_STATIONS';
|
|
166
|
+
|
|
167
|
+
const initialPosition = { lat: 48.5, lng: 12.1 };
|
|
168
|
+
|
|
169
|
+
const mapTypeOptions: SelectOption[] = [
|
|
170
|
+
{ id: Map.TYPE_DEFAULT, label: 'Day' },
|
|
171
|
+
{ id: Map.TYPE_FLEET_STYLE, label: 'Fleet style' },
|
|
172
|
+
{ id: Map.TYPE_SATELLITE, label: 'Satellite' },
|
|
173
|
+
{ id: Map.TYPE_TERRAIN, label: 'Terrain' },
|
|
174
|
+
{ id: Map.TYPE_NIGHT, label: 'Night' },
|
|
175
|
+
];
|
|
176
|
+
|
|
177
|
+
const mapLayerOptions: SelectOption[] = [
|
|
178
|
+
{ id: Map.LAYER_INCIDENTS, label: 'Incidents' },
|
|
179
|
+
{ id: Map.LAYER_TRAFFIC, label: 'Traffic' },
|
|
180
|
+
{ id: Map.LAYER_ROAD_RESTRICTIONS, label: 'Road restrictions' },
|
|
181
|
+
];
|
|
182
|
+
|
|
183
|
+
const languageOptions: SelectOption[] = [
|
|
184
|
+
{ id: 'en', label: 'English' },
|
|
185
|
+
{ id: 'de-DE', label: 'German' },
|
|
186
|
+
{ id: 'pl', label: 'Polish' },
|
|
187
|
+
];
|
|
188
|
+
|
|
189
|
+
const addOrRemove = (layers: string[], value: string) =>
|
|
190
|
+
layers.includes(value) ? without(layers, [value]) : [...layers, value];
|
|
191
|
+
|
|
192
|
+
const FullSettingsExample = () => {
|
|
193
|
+
const [mapType, setMapType] = useState<MapType | undefined>(Map.TYPE_DEFAULT);
|
|
194
|
+
const [mapLayer, setMapLayer] = useState<MapLayer[]>([]);
|
|
195
|
+
const [showCluster, setShowCluster] = useState(true);
|
|
196
|
+
const [currentZoom, setCurrentZoom] = useState(9);
|
|
197
|
+
const [center, setCenter] = useState(initialPosition);
|
|
198
|
+
const [enableWebGL, setEnableWebGL] = useState(true);
|
|
199
|
+
const [enableDevicePixelRatio, setEnableDevicePixelRatio] = useState(true);
|
|
200
|
+
const [language, setLanguage] = useState('en');
|
|
201
|
+
|
|
202
|
+
const [minZoom, setMinZoom] = useState(DEFAULT_MIN_ZOOM);
|
|
203
|
+
const [maxZoom, setMaxZoom] = useState(DEFAULT_MAX_ZOOM);
|
|
204
|
+
|
|
205
|
+
const [clusterData, setClusterData] = useState(generateClusterData(10));
|
|
206
|
+
const [activePoiLayers, setActivePoiLayers] = useState<string[]>([]);
|
|
207
|
+
const [activeTrafficLayers, setActiveTrafficLayers] = useState<string[]>([]);
|
|
208
|
+
const [showCustomerPois, setShowCustomerPois] = useState(false);
|
|
209
|
+
const [showWorkshopPois, setShowWorkshopPois] = useState(false);
|
|
210
|
+
const [showGeofences, setShowGeofences] = useState(false);
|
|
211
|
+
const [showChargingStations, setShowChargingStations] = useState(false);
|
|
212
|
+
|
|
213
|
+
const [mapTypeOptionId, setMapTypeOptionId] = useState<MapType | undefined>(Map.TYPE_DEFAULT);
|
|
214
|
+
const [mapLayerOptionIds, setMapLayerOptionIds] = useState<string[]>([]);
|
|
215
|
+
const [showClusterOption, setShowClusterOption] = useState(true);
|
|
216
|
+
|
|
217
|
+
const [incidents, setIncidents] = useState<MapIncidents>();
|
|
218
|
+
|
|
219
|
+
const mapApiRef = useRef<MapApi>();
|
|
220
|
+
|
|
221
|
+
const handleToggleCustomerPois = () => {
|
|
222
|
+
setShowCustomerPois(!showCustomerPois);
|
|
223
|
+
setActivePoiLayers(addOrRemove(activePoiLayers, CUSTOMER_POIS));
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const handleToggleWorkshopPois = () => {
|
|
227
|
+
setShowWorkshopPois(!showWorkshopPois);
|
|
228
|
+
setActivePoiLayers(addOrRemove(activePoiLayers, WORKSHOP_POIS));
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
const handleToggleGeofences = () => {
|
|
232
|
+
setShowGeofences(!showGeofences);
|
|
233
|
+
setActivePoiLayers(addOrRemove(activePoiLayers, GEOFENCES));
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
const handleToggleChargingStations = () => {
|
|
237
|
+
setShowChargingStations(!showChargingStations);
|
|
238
|
+
setActivePoiLayers(addOrRemove(activePoiLayers, CHARGING_STATIONS));
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const layers = [
|
|
242
|
+
<MapSettingsDropdownHeader key='dividerPois' label='POIs & Layers' />,
|
|
243
|
+
<MapSettingsChargingStationsItem
|
|
244
|
+
key='chargingStations'
|
|
245
|
+
isActive={showChargingStations}
|
|
246
|
+
onToggle={handleToggleChargingStations}
|
|
247
|
+
label='Charging stations'
|
|
248
|
+
/>,
|
|
249
|
+
<MapSettingsGeofenceItem
|
|
250
|
+
key='geofences'
|
|
251
|
+
isActive={showGeofences}
|
|
252
|
+
onToggle={handleToggleGeofences}
|
|
253
|
+
label='Geofences'
|
|
254
|
+
/>,
|
|
255
|
+
<MapWorkshopPoiSettingsItem
|
|
256
|
+
key='mapWorkshopPoiSettingsItem'
|
|
257
|
+
isActive={showWorkshopPois}
|
|
258
|
+
onToggle={handleToggleWorkshopPois}
|
|
259
|
+
label='Workshop POIs'
|
|
260
|
+
/>,
|
|
261
|
+
<MapCustomerPoiSettingsItem
|
|
262
|
+
key='mapCustomerPoiSettingsItem'
|
|
263
|
+
isActive={showCustomerPois}
|
|
264
|
+
onToggle={handleToggleCustomerPois}
|
|
265
|
+
label='Custom POIs'
|
|
266
|
+
/>,
|
|
267
|
+
];
|
|
268
|
+
|
|
269
|
+
const trafficLayers = [
|
|
270
|
+
<MapSettingsDropdownHeader key='dividerTraffic' label='Traffic overlays' />,
|
|
271
|
+
<MapLayerTrafficItem key='mapLayerTrafficItem' label='Traffic' />,
|
|
272
|
+
<MapLayerIncidentsItem key='mapLayerIncidentsItem' label='Incidents' />,
|
|
273
|
+
<MapLayerRoadRestrictionsItem key='mapLayerRoadRestrictionsItem' label='Road restrictions' />,
|
|
274
|
+
];
|
|
275
|
+
|
|
276
|
+
const handleToggleBoundingBox = () => Notification.info('MapBoundingBoxButton clicked');
|
|
277
|
+
const handleToggleCenterMarker = () => {
|
|
278
|
+
Notification.info('MapCenterMarkerButton clicked');
|
|
279
|
+
setCenter(markerPosition);
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// Update selects to reflect changes made in the map settings
|
|
283
|
+
const handleMapTypeChanged = (baseLayer: MapType) => setMapTypeOptionId(baseLayer);
|
|
284
|
+
const handleMapLayerChanged = (activeLayerIds: string[]) => setMapLayerOptionIds(activeLayerIds);
|
|
285
|
+
const handleClusterChanged = (cluster: boolean) => setShowClusterOption(cluster);
|
|
286
|
+
|
|
287
|
+
// Set the select value and update the map with the new setting
|
|
288
|
+
const handleChangeMapType = (selectedMapType: SelectOption | undefined) => {
|
|
289
|
+
setMapType(selectedMapType?.id as MapType);
|
|
290
|
+
setMapTypeOptionId(selectedMapType?.id as MapType);
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
// Set the multiselect value and update the map with the new setting
|
|
294
|
+
const handleChangeMapLayers = (selectedLayerIds: string[]) => {
|
|
295
|
+
setMapLayer(selectedLayerIds as MapLayer[]);
|
|
296
|
+
setMapLayerOptionIds(selectedLayerIds);
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
const handleChangeLanguage = (selectedLanguage: SelectOption | undefined) => {
|
|
300
|
+
selectedLanguage && setLanguage(selectedLanguage.id);
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
// Set the checkbox value and update the map with the new setting
|
|
304
|
+
const handleChangeCluster = (event: React.MouseEvent<HTMLInputElement, MouseEvent>) => {
|
|
305
|
+
const checked = event.currentTarget.checked;
|
|
306
|
+
setShowCluster(checked);
|
|
307
|
+
setShowClusterOption(checked);
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const handleToggleWebGL = (event: React.MouseEvent<HTMLInputElement, MouseEvent>) =>
|
|
311
|
+
setEnableWebGL(event.currentTarget.checked);
|
|
312
|
+
|
|
313
|
+
const handleToggleDevicePixelRatio = (event: React.MouseEvent<HTMLInputElement, MouseEvent>) =>
|
|
314
|
+
setEnableDevicePixelRatio(event.currentTarget.checked);
|
|
315
|
+
|
|
316
|
+
const handleZoomButtons = (value: number) => setCurrentZoom(value);
|
|
317
|
+
const handleChangeMinZoom = (value: number | undefined) => value !== undefined && setMinZoom(value);
|
|
318
|
+
const handleChangeMaxZoom = (value: number | undefined) => value !== undefined && setMaxZoom(value);
|
|
319
|
+
const handleChangeZoom = (value: number | undefined) => value !== undefined && setCurrentZoom(value);
|
|
320
|
+
|
|
321
|
+
const handleResetMapPosition = () => setCenter(initialPosition);
|
|
322
|
+
|
|
323
|
+
const simpleTheme = useMemo(
|
|
324
|
+
() => ({
|
|
325
|
+
getNoisePresentation: ({ name, type }: Asset) => <SingleMapMarker iconNames={[type]} name={name} />,
|
|
326
|
+
getClusterPresentation: (assets: Asset[]) => (
|
|
327
|
+
<ClusterMapMarker
|
|
328
|
+
count={assets.length}
|
|
329
|
+
warningCount={Math.floor((assets.length * 10) / 3)}
|
|
330
|
+
exceptionCount={Math.floor((assets.length * 10) / 5)}
|
|
331
|
+
/>
|
|
332
|
+
),
|
|
333
|
+
}),
|
|
334
|
+
[]
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
const eventListenerMap: EventListenerMap = {
|
|
338
|
+
[EventUtils.MAP_VIEW_CHANGE_END]: (event: MapEvent) => {
|
|
339
|
+
const target = event.currentTarget;
|
|
340
|
+
const api = mapApiRef.current;
|
|
341
|
+
|
|
342
|
+
const lookAtData = target.getViewModel().getLookAtData();
|
|
343
|
+
|
|
344
|
+
const updatedCenter = api?.utils?.getCenter();
|
|
345
|
+
const newZoom = api?.utils?.getZoom();
|
|
346
|
+
|
|
347
|
+
if (!updatedCenter || newZoom === undefined) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
console.log({ center, updatedCenter, currentZoom, newZoom, lookAtData });
|
|
352
|
+
|
|
353
|
+
const isEqualPosition = isEqual(center.lat, updatedCenter?.lat) && isEqual(center.lng, updatedCenter?.lng);
|
|
354
|
+
const isEqualZoom = isEqual(currentZoom, newZoom);
|
|
355
|
+
|
|
356
|
+
if (!(isEqualPosition && isEqualZoom)) {
|
|
357
|
+
const newCenter = { lat: updatedCenter?.lat, lng: updatedCenter?.lng };
|
|
358
|
+
setCenter(newCenter);
|
|
359
|
+
setCurrentZoom(newZoom);
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
return (
|
|
365
|
+
<>
|
|
366
|
+
<div className='display-flex-lg gap-15'>
|
|
367
|
+
<div className='flex-1-1'>
|
|
368
|
+
<Map
|
|
369
|
+
mapType={mapType}
|
|
370
|
+
mapLayer={mapLayer}
|
|
371
|
+
showCluster={showCluster}
|
|
372
|
+
credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
|
|
373
|
+
eventListenerMap={eventListenerMap}
|
|
374
|
+
center={center}
|
|
375
|
+
showScaleBar
|
|
376
|
+
zoom={currentZoom}
|
|
377
|
+
onZoomIn={handleZoomButtons}
|
|
378
|
+
onZoomOut={handleZoomButtons}
|
|
379
|
+
minZoom={minZoom}
|
|
380
|
+
maxZoom={maxZoom}
|
|
381
|
+
height={500}
|
|
382
|
+
onMapTypeChange={handleMapTypeChanged}
|
|
383
|
+
onMapLayerChange={handleMapLayerChanged}
|
|
384
|
+
onShowClusterChange={handleClusterChanged}
|
|
385
|
+
onIncidentsChange={setIncidents}
|
|
386
|
+
enableWebGL={enableWebGL}
|
|
387
|
+
enableDevicePixelRatio={enableDevicePixelRatio}
|
|
388
|
+
zoomAnimation={false}
|
|
389
|
+
language={language}
|
|
390
|
+
mapSettings={
|
|
391
|
+
<MapSettings
|
|
392
|
+
options={[
|
|
393
|
+
<MapTypeSettings
|
|
394
|
+
key='mapTypeSettings'
|
|
395
|
+
tooltip='Change map type'
|
|
396
|
+
dropdownHeaderText='Map views'
|
|
397
|
+
defaultTypeLabel='Default view'
|
|
398
|
+
truckTypeLabel='Truck view'
|
|
399
|
+
terrainTypeLabel='Terrain view'
|
|
400
|
+
satelliteTypeLabel='Satellite view'
|
|
401
|
+
nightTypeLabel='Night view'
|
|
402
|
+
/>,
|
|
403
|
+
<MapClusterSettings
|
|
404
|
+
key='mapClusterSettings'
|
|
405
|
+
tooltip='Enable or disable marker cluster'
|
|
406
|
+
dropdownHeaderText='Vehicle cluster'
|
|
407
|
+
clusterEnabledLabel='Enable cluster'
|
|
408
|
+
clusterDisabledLabel='Disable cluster'
|
|
409
|
+
/>,
|
|
410
|
+
<MapLayerSettings
|
|
411
|
+
key='mapLayerSettingsTraffic'
|
|
412
|
+
layers={trafficLayers}
|
|
413
|
+
activeLayers={activeTrafficLayers}
|
|
414
|
+
tooltip='Toggle various traffic overlays'
|
|
415
|
+
/>,
|
|
416
|
+
<MapAdditionalLayerSettings
|
|
417
|
+
key='mapLayerSettingsPoi'
|
|
418
|
+
layers={layers}
|
|
419
|
+
activeLayers={activePoiLayers}
|
|
420
|
+
tooltip='Toggle various POI layers'
|
|
421
|
+
/>,
|
|
422
|
+
<MapBoundingBoxButton
|
|
423
|
+
key='mapBoundingBoxButton'
|
|
424
|
+
onToggle={handleToggleBoundingBox}
|
|
425
|
+
tooltip='Zoom to current Element'
|
|
426
|
+
/>,
|
|
427
|
+
<MapCenterMarkerButton
|
|
428
|
+
key='mapCenterMarkerButton'
|
|
429
|
+
onToggle={handleToggleCenterMarker}
|
|
430
|
+
tooltip='Center current Marker'
|
|
431
|
+
/>,
|
|
432
|
+
<MapLockMarkerButton key='mapLockMarkerButton' />,
|
|
433
|
+
]}
|
|
434
|
+
/>
|
|
435
|
+
}
|
|
436
|
+
>
|
|
437
|
+
{(api: MapApi) => {
|
|
438
|
+
mapApiRef.current = api;
|
|
439
|
+
console.log('render example map elements');
|
|
440
|
+
|
|
441
|
+
// if needed, render cluster or marker layer here
|
|
442
|
+
return (
|
|
443
|
+
<>
|
|
444
|
+
<Marker
|
|
445
|
+
position={markerPosition}
|
|
446
|
+
icon={
|
|
447
|
+
<SingleMapMarker iconNames={['truck']} markerColor='bg-map-marker-asset' />
|
|
448
|
+
}
|
|
449
|
+
/>
|
|
450
|
+
<Polygon
|
|
451
|
+
points={polygonPoints}
|
|
452
|
+
style={{ strokeColor: STROKE_COLOR, fillColor: FILL_COLOR }}
|
|
453
|
+
/>
|
|
454
|
+
<Route
|
|
455
|
+
hasArrows
|
|
456
|
+
positions={routePoints}
|
|
457
|
+
startIcon={
|
|
458
|
+
<SingleMapMarker iconNames={['start']} markerColor='bg-map-marker-route' />
|
|
459
|
+
}
|
|
460
|
+
endIcon={
|
|
461
|
+
<SingleMapMarker iconNames={['finish']} markerColor='bg-map-marker-route' />
|
|
462
|
+
}
|
|
463
|
+
/>
|
|
464
|
+
<Circle
|
|
465
|
+
position={circlePosition}
|
|
466
|
+
radius={5000}
|
|
467
|
+
style={{ strokeColor: STROKE_COLOR, fillColor: FILL_COLOR }}
|
|
468
|
+
precision={30}
|
|
469
|
+
/>
|
|
470
|
+
<Marker
|
|
471
|
+
position={{ lat: 48.56, lng: 11.38 }}
|
|
472
|
+
icon={
|
|
473
|
+
<SingleMapMarker
|
|
474
|
+
iconNames={['truck']}
|
|
475
|
+
markerColor='bg-map-marker-asset'
|
|
476
|
+
active
|
|
477
|
+
/>
|
|
478
|
+
}
|
|
479
|
+
/>
|
|
480
|
+
<Marker
|
|
481
|
+
position={{ lat: 48.56, lng: 11.48 }}
|
|
482
|
+
icon={
|
|
483
|
+
<SingleMapMarker
|
|
484
|
+
iconNames={['factory']}
|
|
485
|
+
markerColor='bg-map-marker-poi'
|
|
486
|
+
active
|
|
487
|
+
/>
|
|
488
|
+
}
|
|
489
|
+
/>
|
|
490
|
+
<Marker
|
|
491
|
+
position={{ lat: 48.56, lng: 11.58 }}
|
|
492
|
+
icon={
|
|
493
|
+
<SingleMapMarker
|
|
494
|
+
iconNames={['geofence']}
|
|
495
|
+
markerColor='bg-map-marker-geofence'
|
|
496
|
+
active
|
|
497
|
+
/>
|
|
498
|
+
}
|
|
499
|
+
/>
|
|
500
|
+
<Marker
|
|
501
|
+
position={{ lat: 48.56, lng: 11.68 }}
|
|
502
|
+
icon={
|
|
503
|
+
<SingleMapMarker
|
|
504
|
+
iconNames={['route']}
|
|
505
|
+
markerColor='bg-map-marker-route'
|
|
506
|
+
active
|
|
507
|
+
/>
|
|
508
|
+
}
|
|
509
|
+
/>
|
|
510
|
+
<Marker
|
|
511
|
+
position={{ lat: 48.45, lng: 11.38 }}
|
|
512
|
+
icon={
|
|
513
|
+
<SingleMapMarker iconNames={['truck']} markerColor='bg-map-marker-asset' />
|
|
514
|
+
}
|
|
515
|
+
/>
|
|
516
|
+
<Marker
|
|
517
|
+
position={{ lat: 48.45, lng: 11.48 }}
|
|
518
|
+
icon={
|
|
519
|
+
<SingleMapMarker iconNames={['factory']} markerColor='bg-map-marker-poi' />
|
|
520
|
+
}
|
|
521
|
+
/>
|
|
522
|
+
<Marker
|
|
523
|
+
position={{ lat: 48.45, lng: 11.58 }}
|
|
524
|
+
icon={
|
|
525
|
+
<SingleMapMarker
|
|
526
|
+
iconNames={['geofence']}
|
|
527
|
+
markerColor='bg-map-marker-geofence'
|
|
528
|
+
/>
|
|
529
|
+
}
|
|
530
|
+
/>
|
|
531
|
+
<Marker
|
|
532
|
+
position={{ lat: 48.45, lng: 11.68 }}
|
|
533
|
+
icon={
|
|
534
|
+
<SingleMapMarker iconNames={['route']} markerColor='bg-map-marker-route' />
|
|
535
|
+
}
|
|
536
|
+
/>
|
|
537
|
+
<MarkerLayer data={clusterData} simpleTheme={simpleTheme} eps={500} />
|
|
538
|
+
</>
|
|
539
|
+
);
|
|
540
|
+
}}
|
|
541
|
+
</Map>
|
|
542
|
+
|
|
543
|
+
<div className='from-group display-flex gap-15 flex-wrap margin-top-15'>
|
|
544
|
+
<div className='min-width-150'>
|
|
545
|
+
<label className='margin-0'>Map Type</label>
|
|
546
|
+
<Select
|
|
547
|
+
placeholder='Please select...'
|
|
548
|
+
options={mapTypeOptions}
|
|
549
|
+
value={mapTypeOptionId ? [mapTypeOptionId] : []}
|
|
550
|
+
onChange={handleChangeMapType}
|
|
551
|
+
/>
|
|
552
|
+
</div>
|
|
553
|
+
<div className='min-width-200'>
|
|
554
|
+
<label className='margin-0'>Map Layer</label>
|
|
555
|
+
<Multiselect
|
|
556
|
+
placeholder='Please select...'
|
|
557
|
+
options={mapLayerOptions}
|
|
558
|
+
value={mapLayerOptionIds}
|
|
559
|
+
onChange={handleChangeMapLayers}
|
|
560
|
+
/>
|
|
561
|
+
</div>
|
|
562
|
+
<div className='min-width-150'>
|
|
563
|
+
<label className='margin-0'>Language</label>
|
|
564
|
+
<Select options={languageOptions} value={[language]} onChange={handleChangeLanguage} />
|
|
565
|
+
</div>
|
|
566
|
+
<div className='width-100'>
|
|
567
|
+
<label className='margin-0'>Zoom</label>
|
|
568
|
+
<NumberControl min={1} max={19} value={currentZoom} step={1} onChange={handleChangeZoom} />
|
|
569
|
+
</div>
|
|
570
|
+
<div className='width-100'>
|
|
571
|
+
<label className='margin-0'>Min zoom</label>
|
|
572
|
+
<NumberControl min={1} max={19} value={minZoom} step={1} onChange={handleChangeMinZoom} />
|
|
573
|
+
</div>
|
|
574
|
+
<div className='width-100'>
|
|
575
|
+
<label className='margin-0'>Max zoom</label>
|
|
576
|
+
<NumberControl min={1} max={20} value={maxZoom} step={1} onChange={handleChangeMaxZoom} />
|
|
577
|
+
</div>
|
|
578
|
+
<div className='min-width-100'>
|
|
579
|
+
<label className='margin-0'>Map center</label>
|
|
580
|
+
<div>
|
|
581
|
+
<Button onClick={handleResetMapPosition}>Reset position</Button>
|
|
582
|
+
</div>
|
|
583
|
+
</div>
|
|
584
|
+
<div className='min-width-100'>
|
|
585
|
+
<label className='margin-0'>Cluster</label>
|
|
586
|
+
<Checkbox
|
|
587
|
+
checked={showClusterOption}
|
|
588
|
+
onClick={handleChangeCluster}
|
|
589
|
+
className='checkbox padding-y-5'
|
|
590
|
+
>
|
|
591
|
+
Show cluster
|
|
592
|
+
</Checkbox>
|
|
593
|
+
</div>
|
|
594
|
+
<div className='min-width-200'>
|
|
595
|
+
<label className='margin-0'>Rendering</label>
|
|
596
|
+
<div className='display-flex gap-20'>
|
|
597
|
+
<Checkbox
|
|
598
|
+
checked={enableWebGL}
|
|
599
|
+
onClick={handleToggleWebGL}
|
|
600
|
+
className='checkbox padding-y-5'
|
|
601
|
+
>
|
|
602
|
+
WebGL vector tiles
|
|
603
|
+
</Checkbox>
|
|
604
|
+
</div>
|
|
605
|
+
<div className='display-flex gap-20'>
|
|
606
|
+
<Checkbox
|
|
607
|
+
checked={enableDevicePixelRatio}
|
|
608
|
+
onClick={handleToggleDevicePixelRatio}
|
|
609
|
+
className='checkbox padding-y-5'
|
|
610
|
+
>
|
|
611
|
+
Use device pixel ratio
|
|
612
|
+
</Checkbox>
|
|
613
|
+
</div>
|
|
614
|
+
</div>
|
|
615
|
+
<div className='min-width-200'>
|
|
616
|
+
<label className='margin-0'>Map center</label>
|
|
617
|
+
<div>
|
|
618
|
+
<Position latitude={center.lat} longitude={center.lng} />
|
|
619
|
+
</div>
|
|
620
|
+
</div>
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
|
|
624
|
+
{mapLayerOptionIds.includes(MAP_LAYER_INCIDENTS) && (
|
|
625
|
+
<IncidentsList
|
|
626
|
+
mapLayer={mapLayerOptionIds}
|
|
627
|
+
incidents={incidents}
|
|
628
|
+
api={mapApiRef.current}
|
|
629
|
+
onIncidentSelect={(pos: MapPosition) => {
|
|
630
|
+
// at zoom level 16 the incident cluster is dissolved
|
|
631
|
+
setCurrentZoom(16);
|
|
632
|
+
setCenter(pos);
|
|
633
|
+
}}
|
|
634
|
+
onPositionChange={(pos: MapPosition, zoom: number) => {
|
|
635
|
+
setCenter(pos);
|
|
636
|
+
setCurrentZoom(zoom);
|
|
637
|
+
}}
|
|
638
|
+
/>
|
|
639
|
+
)}
|
|
640
|
+
</div>
|
|
641
|
+
</>
|
|
642
|
+
);
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
type IncidentItemProps = {
|
|
646
|
+
incident: IncidentDataPoint;
|
|
647
|
+
api?: MapApi;
|
|
648
|
+
onClick: (position: MapPosition) => void;
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
const IncidentItem = (props: IncidentItemProps) => {
|
|
652
|
+
const { api, incident, onClick } = props;
|
|
653
|
+
const { id, description, position, tooltipContent } = incident;
|
|
654
|
+
|
|
655
|
+
const [showInfo, setShowInfo] = useState(false);
|
|
656
|
+
|
|
657
|
+
const handleGoToDataPoint = () => onClick(position);
|
|
658
|
+
|
|
659
|
+
return (
|
|
660
|
+
<div
|
|
661
|
+
key={id}
|
|
662
|
+
className='list-group-item cursor-pointer hover-bg-lightest'
|
|
663
|
+
onClick={handleGoToDataPoint}
|
|
664
|
+
onMouseEnter={() => setShowInfo(true)}
|
|
665
|
+
onMouseLeave={() => setShowInfo(false)}
|
|
666
|
+
>
|
|
667
|
+
<div className='line-height-125rel margin-bottom-5'>{description.value}</div>
|
|
668
|
+
<div className='text-size-12 text-dark text-italic text-color-dark'>{JSON.stringify(position)}</div>
|
|
669
|
+
{showInfo && (
|
|
670
|
+
<InfoBubble api={api} position={position} content={tooltipContent} markerOffset={{ x: 0, y: -31 }} />
|
|
671
|
+
)}
|
|
672
|
+
</div>
|
|
673
|
+
);
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
type IncidentsListProps = {
|
|
677
|
+
mapLayer: string[];
|
|
678
|
+
incidents?: MapIncidents | undefined;
|
|
679
|
+
api?: MapApi;
|
|
680
|
+
onIncidentSelect: (position: MapPosition) => void;
|
|
681
|
+
onPositionChange: (position: MapPosition, zoom: number) => void;
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
const IncidentsList = (props: IncidentsListProps) => {
|
|
685
|
+
const { mapLayer, incidents, api, onIncidentSelect, onPositionChange } = props;
|
|
686
|
+
|
|
687
|
+
const [previousPosition, setPreviousPosition] = useState<MapPosition | undefined>();
|
|
688
|
+
const [previousZoom, setPreviousZoom] = useState<number | undefined>();
|
|
689
|
+
|
|
690
|
+
const handleGoBack = () => {
|
|
691
|
+
if (previousPosition && previousZoom) {
|
|
692
|
+
onPositionChange(previousPosition, previousZoom);
|
|
693
|
+
setPreviousPosition(undefined);
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
const handleGoToDataPoint = (pos: MapPosition) => {
|
|
698
|
+
// mapApiRef.current?.map.setCenter(pos, true);
|
|
699
|
+
// mapApiRef.current?.map.setZoom(16, true);
|
|
700
|
+
|
|
701
|
+
setPreviousPosition(api?.map.getCenter());
|
|
702
|
+
setPreviousZoom(api?.map.getZoom());
|
|
703
|
+
|
|
704
|
+
onIncidentSelect(pos);
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
return (
|
|
708
|
+
<div className='max-width-300-lg min-width-300-lg'>
|
|
709
|
+
<div className='display-flex justify-content-between align-items-end'>
|
|
710
|
+
<label>Incidents</label>
|
|
711
|
+
{previousPosition ? (
|
|
712
|
+
<div className='btn btn-link btn-link-inline margin-bottom-5' onClick={handleGoBack}>
|
|
713
|
+
<span className='rioglyph rioglyph-arrow-left' />
|
|
714
|
+
<span>Previous position</span>
|
|
715
|
+
</div>
|
|
716
|
+
) : (
|
|
717
|
+
<div />
|
|
718
|
+
)}
|
|
719
|
+
</div>
|
|
720
|
+
<div className='list-group border rounded max-height-500 overflow-auto'>
|
|
721
|
+
{mapLayer.includes(MAP_LAYER_INCIDENTS) && !incidents && (
|
|
722
|
+
<div className='list-group-item text-color-dark text-italic'>
|
|
723
|
+
Too many incidents. Please zoom in.
|
|
724
|
+
</div>
|
|
725
|
+
)}
|
|
726
|
+
{incidents?.results.length === 0 && (
|
|
727
|
+
<div className='list-group-item text-color-dark text-italic'>No incidents found.</div>
|
|
728
|
+
)}
|
|
729
|
+
{incidents?.results?.map(incident => (
|
|
730
|
+
<IncidentItem key={incident.id} api={api} incident={incident} onClick={handleGoToDataPoint} />
|
|
731
|
+
))}
|
|
732
|
+
</div>
|
|
733
|
+
</div>
|
|
734
|
+
);
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
type MapSettingsChargingStationsItemProps = {
|
|
738
|
+
isActive: boolean;
|
|
739
|
+
label?: string | JSX.Element;
|
|
740
|
+
onToggle: () => void;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
export const MapSettingsChargingStationsItem = (props: MapSettingsChargingStationsItemProps) => {
|
|
744
|
+
const { isActive = false, label, onToggle = () => {} } = props;
|
|
745
|
+
|
|
746
|
+
const iconClasses = classNames(
|
|
747
|
+
'display-flex',
|
|
748
|
+
'justify-content-center',
|
|
749
|
+
'align-items-center',
|
|
750
|
+
'rioglyph rioglyph-filling-e-station',
|
|
751
|
+
'height-40 width-40',
|
|
752
|
+
'text-size-200pct',
|
|
753
|
+
isActive ? 'text-color-highlight' : 'text-color-gray'
|
|
754
|
+
);
|
|
755
|
+
|
|
756
|
+
const icon = <span className={iconClasses} />;
|
|
757
|
+
|
|
758
|
+
return (
|
|
759
|
+
<MapSettingsItem
|
|
760
|
+
className='MapSettingsChargingStations text-size-15'
|
|
761
|
+
onClick={onToggle}
|
|
762
|
+
isActive={isActive}
|
|
763
|
+
activeIcon={icon}
|
|
764
|
+
inactiveIcon={icon}
|
|
765
|
+
label={label}
|
|
766
|
+
/>
|
|
767
|
+
);
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
type MapSettingsGeofenceItemProps = {
|
|
771
|
+
isActive: boolean;
|
|
772
|
+
label?: string | JSX.Element;
|
|
773
|
+
onToggle: () => void;
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
export const MapSettingsGeofenceItem = (props: MapSettingsGeofenceItemProps) => {
|
|
777
|
+
const { isActive = false, label, onToggle = () => {} } = props;
|
|
778
|
+
|
|
779
|
+
const iconClasses = classNames(
|
|
780
|
+
'display-flex',
|
|
781
|
+
'justify-content-center',
|
|
782
|
+
'align-items-center',
|
|
783
|
+
'rioglyph rioglyph-geofence',
|
|
784
|
+
'height-40 width-40',
|
|
785
|
+
'text-size-200pct',
|
|
786
|
+
isActive ? 'text-color-highlight' : 'text-color-gray'
|
|
787
|
+
);
|
|
788
|
+
|
|
789
|
+
const icon = <span className={iconClasses} />;
|
|
790
|
+
|
|
791
|
+
return (
|
|
792
|
+
<MapSettingsItem
|
|
793
|
+
className='MapSettingsGeofences text-size-15'
|
|
794
|
+
onClick={onToggle}
|
|
795
|
+
isActive={isActive}
|
|
796
|
+
activeIcon={icon}
|
|
797
|
+
inactiveIcon={icon}
|
|
798
|
+
label={label}
|
|
799
|
+
/>
|
|
800
|
+
);
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
export default FullSettingsExample;
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
## Settings examples
|
|
807
|
+
|
|
808
|
+
### Example: Example 2
|
|
809
|
+
|
|
810
|
+
No settings
|
|
811
|
+
|
|
812
|
+
Terms of use© 1987–2025 HERE
|
|
813
|
+
|
|
814
|
+
10 km
|
|
815
|
+
|
|
816
|
+
Choose view
|
|
817
|
+
Map view
|
|
818
|
+
Satellite
|
|
819
|
+
|
|
820
|
+
Traffic conditions
|
|
821
|
+
Show traffic incidents
|
|
822
|
+
|
|
823
|
+
Without cluster settings
|
|
824
|
+
|
|
825
|
+
Terms of use© 1987–2025 HERE
|
|
826
|
+
|
|
827
|
+
10 km
|
|
828
|
+
|
|
829
|
+
Choose view
|
|
830
|
+
Map view
|
|
831
|
+
Satellite
|
|
832
|
+
Terrain
|
|
833
|
+
|
|
834
|
+
Show traffic incidents
|
|
835
|
+
|
|
836
|
+
Without cluster and map layer settings
|
|
837
|
+
|
|
838
|
+
Terms of use© 1987–2025 HERE
|
|
839
|
+
|
|
840
|
+
10 km
|
|
841
|
+
|
|
842
|
+
Choose view
|
|
843
|
+
Map view
|
|
844
|
+
Satellite
|
|
845
|
+
Terrain
|
|
846
|
+
|
|
847
|
+
Show traffic incidents
|
|
848
|
+
|
|
849
|
+
Static map without interaction
|
|
850
|
+
|
|
851
|
+
Terms of use© 1987–2025 HERE
|
|
852
|
+
|
|
853
|
+
10 km
|
|
854
|
+
|
|
855
|
+
Choose view
|
|
856
|
+
Map view
|
|
857
|
+
Satellite
|
|
858
|
+
Terrain
|
|
859
|
+
|
|
860
|
+
Show traffic incidents
|
|
861
|
+
|
|
862
|
+
#### Summary
|
|
863
|
+
|
|
864
|
+
No settings
|
|
865
|
+
|
|
866
|
+
Terms of use© 1987–2025 HERE
|
|
867
|
+
|
|
868
|
+
10 km
|
|
869
|
+
|
|
870
|
+
Choose view
|
|
871
|
+
Map view
|
|
872
|
+
Satellite
|
|
873
|
+
|
|
874
|
+
Traffic conditions
|
|
875
|
+
Show traffic incidents
|
|
876
|
+
|
|
877
|
+
Without cluster settings
|
|
878
|
+
|
|
879
|
+
Terms of use© 1987–2025 HERE
|
|
880
|
+
|
|
881
|
+
10 km
|
|
882
|
+
|
|
883
|
+
Choose view
|
|
884
|
+
Map view
|
|
885
|
+
Satellite
|
|
886
|
+
Terrain
|
|
887
|
+
|
|
888
|
+
Show traffic incidents
|
|
889
|
+
|
|
890
|
+
Without cluster and map layer settings
|
|
891
|
+
|
|
892
|
+
Terms of use© 1987–2025 HERE
|
|
893
|
+
|
|
894
|
+
10 km
|
|
895
|
+
|
|
896
|
+
Choose view
|
|
897
|
+
Map view
|
|
898
|
+
Satellite
|
|
899
|
+
Terrain
|
|
900
|
+
|
|
901
|
+
Show traffic incidents
|
|
902
|
+
|
|
903
|
+
Static map without interaction
|
|
904
|
+
|
|
905
|
+
Terms of use© 1987–2025 HERE
|
|
906
|
+
|
|
907
|
+
10 km
|
|
908
|
+
|
|
909
|
+
Choose view
|
|
910
|
+
Map view
|
|
911
|
+
Satellite
|
|
912
|
+
Terrain
|
|
913
|
+
|
|
914
|
+
Show traffic incidents
|
|
915
|
+
|
|
916
|
+
#### React (tsx)
|
|
917
|
+
|
|
918
|
+
```tsx
|
|
919
|
+
import Map from '@rio-cloud/rio-uikit/Map';
|
|
920
|
+
import MapSettings from '@rio-cloud/rio-uikit/MapSettings';
|
|
921
|
+
import MapLayerSettings from '@rio-cloud/rio-uikit/MapLayerSettings';
|
|
922
|
+
import MapTypeSettings from '@rio-cloud/rio-uikit/MapTypeSettings';
|
|
923
|
+
import MapLayerIncidentsItem from '@rio-cloud/rio-uikit/MapLayerIncidentsItem';
|
|
924
|
+
import MapLayerRoadRestrictionsItem from '@rio-cloud/rio-uikit/MapLayerRoadRestrictionsItem';
|
|
925
|
+
import MapLayerTrafficItem from '@rio-cloud/rio-uikit/MapLayerTrafficItem';
|
|
926
|
+
|
|
927
|
+
import { UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT } from '../uikit_demo_credentials';
|
|
928
|
+
import MapSettingsDropdownHeader from '@rio-cloud/rio-uikit/MapSettingsDropdownHeader';
|
|
929
|
+
|
|
930
|
+
const SettingsExample = () => {
|
|
931
|
+
const position = { lat: 48.1351, lng: 11.582 };
|
|
932
|
+
|
|
933
|
+
const layers = [
|
|
934
|
+
<MapSettingsDropdownHeader key='dividerTraffic' label='Traffic overlays' />,
|
|
935
|
+
<MapLayerTrafficItem key='mapLayerTrafficItem' label='Traffic' />,
|
|
936
|
+
<MapLayerIncidentsItem key='mapLayerIncidentsItem' label='Incidents' />,
|
|
937
|
+
<MapLayerRoadRestrictionsItem key='mapLayerRoadRestrictionsItem' label='Road restrictions' />,
|
|
938
|
+
];
|
|
939
|
+
|
|
940
|
+
return (
|
|
941
|
+
<div className='display-grid grid-cols-2 gap-15'>
|
|
942
|
+
<div>
|
|
943
|
+
<label>No settings</label>
|
|
944
|
+
<Map
|
|
945
|
+
credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
|
|
946
|
+
center={position}
|
|
947
|
+
zoom={10}
|
|
948
|
+
height={200}
|
|
949
|
+
mapSettings={<MapSettings />}
|
|
950
|
+
/>
|
|
951
|
+
</div>
|
|
952
|
+
<div>
|
|
953
|
+
<label>Without cluster settings</label>
|
|
954
|
+
<Map
|
|
955
|
+
credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
|
|
956
|
+
center={position}
|
|
957
|
+
zoom={10}
|
|
958
|
+
height={200}
|
|
959
|
+
mapType={Map.TYPE_TERRAIN}
|
|
960
|
+
mapSettings={
|
|
961
|
+
<MapSettings
|
|
962
|
+
options={[
|
|
963
|
+
<MapTypeSettings
|
|
964
|
+
key='mapTypeSettings'
|
|
965
|
+
tooltip='Change map type'
|
|
966
|
+
dropdownHeaderText='Map views'
|
|
967
|
+
defaultTypeLabel='Default view'
|
|
968
|
+
truckTypeLabel='Truck view'
|
|
969
|
+
terrainTypeLabel='Terrain view'
|
|
970
|
+
satelliteTypeLabel='Satellite view'
|
|
971
|
+
nightTypeLabel='Night view'
|
|
972
|
+
/>,
|
|
973
|
+
<MapLayerSettings
|
|
974
|
+
key='mapLayerSettings'
|
|
975
|
+
layers={layers}
|
|
976
|
+
tooltip='Toggle various map overlays'
|
|
977
|
+
/>,
|
|
978
|
+
]}
|
|
979
|
+
/>
|
|
980
|
+
}
|
|
981
|
+
/>
|
|
982
|
+
</div>
|
|
983
|
+
<div>
|
|
984
|
+
<label>Without cluster and map layer settings</label>
|
|
985
|
+
<Map
|
|
986
|
+
credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
|
|
987
|
+
center={position}
|
|
988
|
+
zoom={10}
|
|
989
|
+
height={200}
|
|
990
|
+
mapType={Map.TYPE_FLEET_STYLE}
|
|
991
|
+
mapSettings={
|
|
992
|
+
<MapSettings
|
|
993
|
+
options={[
|
|
994
|
+
<MapTypeSettings
|
|
995
|
+
key='mapTypeSettings'
|
|
996
|
+
tooltip='Change map type'
|
|
997
|
+
defaultTypeLabel='Default view'
|
|
998
|
+
truckTypeLabel='Truck view'
|
|
999
|
+
terrainTypeLabel='Terrain view'
|
|
1000
|
+
satelliteTypeLabel='Satellite view'
|
|
1001
|
+
nightTypeLabel='Night view'
|
|
1002
|
+
/>,
|
|
1003
|
+
]}
|
|
1004
|
+
/>
|
|
1005
|
+
}
|
|
1006
|
+
/>
|
|
1007
|
+
</div>
|
|
1008
|
+
<div>
|
|
1009
|
+
<label>Static map without interaction</label>
|
|
1010
|
+
<Map
|
|
1011
|
+
credentials={UIKIT_DEMO_CREDENTIALS_ARE_NOT_ALLOWED_IN_PROD_ENVIRONMENT}
|
|
1012
|
+
center={position}
|
|
1013
|
+
zoom={10}
|
|
1014
|
+
height={200}
|
|
1015
|
+
disableBehavior
|
|
1016
|
+
mapType={Map.TYPE_SATELLITE}
|
|
1017
|
+
enableWebGL={false}
|
|
1018
|
+
mapSettings={
|
|
1019
|
+
<MapSettings
|
|
1020
|
+
options={[
|
|
1021
|
+
<MapTypeSettings
|
|
1022
|
+
key='mapTypeSettings'
|
|
1023
|
+
tooltip='Change map type'
|
|
1024
|
+
defaultTypeLabel='Default view'
|
|
1025
|
+
truckTypeLabel='Truck view'
|
|
1026
|
+
terrainTypeLabel='Terrain view'
|
|
1027
|
+
satelliteTypeLabel='Satellite view'
|
|
1028
|
+
nightTypeLabel='Night view'
|
|
1029
|
+
/>,
|
|
1030
|
+
]}
|
|
1031
|
+
/>
|
|
1032
|
+
}
|
|
1033
|
+
/>
|
|
1034
|
+
</div>
|
|
1035
|
+
</div>
|
|
1036
|
+
);
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
export default SettingsExample;
|
|
1040
|
+
```
|