UXP
v2.0.0
v2.0.0
  • Introduction
    • Welcome
    • Understanding the Portal
    • Getting Started
  • Releases
  • Interface Types
    • Widgets
  • Interface Guidelines
    • Lists
  • Interacting with Lucy
    • Real-Time Communication
  • Interface Guidelines
  • Custom Styles and CSS
  • Publishing your UIs
    • Bundles
  • lucy-xp
  • Components
    • AsyncButton
    • AutoCompleteInput
    • BarChartLoader
    • Button
    • CRUDComponent
    • CalendarComponent
    • Checkbox
    • ColorPallet
    • ColorPicker
    • ConfirmButton
    • DataGrid
    • DataList
    • DataTable
    • DatePicker
    • DateRangePicker
    • DateTimePicker
    • DefaultLoader
    • DonutChartLoader
    • DropDownButton
    • DynamicForm
    • DynamicSelect
    • FileInput
    • FilterPanel
    • FormFeedback
    • FormField
    • GaugeLoader
    • HeatmapChartLoader
    • HorizontalScrollList
    • IconButton
    • Input
    • ItemCard
    • ItemListCard
    • Label
    • LinkButtonWidget
    • LinkWidgetContainer
    • Loading
    • LoadingSpinner
    • LocalizationForm
    • LocalizationFormModal
    • MapComponent
    • Modal
    • ModalWizard
    • MultiSelect
    • NotificationBlock
    • PieChartComponent
    • Popover
    • PortalContainer
    • ProfileImage
    • RadialGauge
    • SampleDataLabel
    • SearchBox
    • Select
    • SideBar
    • SpaceworxDescriptionTag
    • TabComponent
    • TableComponent
    • TextArea
    • ThemeChanger
    • TimePicker
    • TimeRangePicker
    • TitleBar
    • ToggleFilter
    • Tooltip
    • TreeViewSelectInput
    • TrendChartComponent
    • UserProfile
    • WidgetContainerBlock
    • WidgetWrapper
    • Wizard
  • Hooks
    • useAlert
    • useDebounce
    • useEffectWithPolling
    • useEventSubscriber
    • useFields
    • useMessageBus
    • useResizeEffect
    • useToast
    • useUpdateWidgetProps
  • Types
    • ActionResponse
    • CRUDComponentInstanceProps
    • CRUDComponentProps
    • Column
    • DynamicFormFieldProps
    • DynamicFormProps
    • ExtendedFormProps
    • FieldsHook
    • FormProps
    • FormSectionProps
    • FormValue
    • IAlertResult
    • IAnimation
    • IAutoCompleteInputInstanceProps
    • IButtonSize
    • IButtonType
    • IBuyOnSpaceworxButtonProps
    • ICalendarComponentProps
    • ICallback
    • ICheckboxInstanceProps
    • ICheckboxType
    • ICircleBound
    • IColorPalletProps
    • IColorPickerPosition
    • IColorPickerProps
    • IColorTypes
    • IContentFunction
    • IDataFunction
    • IDataItem
    • IDataTableColumn
    • IDatePickerProps
    • IDateRangePickerProps
    • IDateTimePickerProps
    • IDivIconInterface
    • IDropDownButtonPosition
    • IDropDownButtonProps
    • IDynamicSelectDataFunction
    • IEventDispatcher
    • IEventSubscriber
    • IFileInputInstanceProps
    • IFileInputProps
    • IGaugeProps
    • IHeatmapConfiguration
    • IHeatmapPoint
    • IInputInstanceProps
    • IInputType
    • ILanguage
    • ILocalisationFormModalInstanceProps
    • ILocalisationFormModalProps
    • ILocalisationFormProps
    • IMarker
    • IMessage
    • IModalWizardProps
    • IModalWizardStep
    • IModalWizardStepProps
    • IMultiSelectProps
    • IPolygonBound
    • IPopoverPosition
    • IPopoverProps
    • IPortalContainerProps
    • IPosition
    • IPreviewDetails
    • IProfileProps
    • IRegion
    • IRemove
    • IRenderMarkerPopup
    • IRenderMarkerTooltip
    • ISampleDataLabelProps
    • ISearchBoxInstanceProps
    • ISelectProps
    • ISidebarProps
    • ISize
    • ISpaceworxDescriptionTagProps
    • IStaticImage
    • ITextAreaInstanceProps
    • IThemeChangerProps
    • ITitleFunc
    • IToast
    • IToastResult
    • IToggleOption
    • ITooltipPosition
    • ITooltipProps
    • IUseEffectWithPolling
    • IUseUpdateWidgetProps
    • IWidgetContainerBlockProps
    • IWidgetPreloaderLoaderProps
    • IWidgetWrapperProps
    • IWizardStep
    • IWizardStepProps
    • ListProps
    • MessageBusHook
    • PaginationProps
    • RenderCustomFormView
    • ResizeEffectHook
    • TabComponentProps
    • TabComponentStyles
    • TableComponentProps
    • ToastHook
    • TreeViewSelectInputInstanceProps
    • TreeViewSelectInputProps
    • regionType
Powered by GitBook
On this page
  • Installation
  • Properties
  • mapUrl
  • staticImage
  • center
  • markers
  • onMarkerClick
  • regions
  • onRegionClick
  • heatmap
  • zoom
  • maxZoom
  • minZoom
  • zoomOnScroll
  • onClick
  • onZoomEnd
  • onDragEnd
  1. Components

MapComponent

A map widget that can show a pannable/zoomable map with markers

Installation

import {MapComponent} from 'uxp/components';

Properties

Name
Type
Description

mapUrl

string

The url of the tile server that will serve up map tiles. This url should have the following placeholders in them: {x}, {y} and {z} {z} represents the current zoom level

staticImage

A static image to use instead of a map layout. If you are using a static image, specify mapUrl as an empty string. The static image consists of a url for the image and a width and height of the image. Note that the width and height values be relative - just that the ratio should be accurate.

center

{ position: IMarker, renderMarker?: boolean }

Where the map is centered.

markers

IMarker[]

A list of markers to render. Each marker has a latitude longitude and data field. The data field can store arbitrary data.

onMarkerClick

(el: any, data: any) => void

This handler gets called whenever a marker is clicked on. The first parameter represents the marker element that was clicked on. The second parameter represents the data associated with the marker

regions

IRegion[]

regions to show on map

onRegionClick

(event: any, data: any) => void

this handler will get called when a region is clicked

heatmap

If you want to overlay a heatmap - assign this object with some valid value

zoom

number

The default zoom level to show on the map

maxZoom

number

max zoom level. optional. default is 19

minZoom

number

min zoom level. optional. default is -19

zoomOnScroll

boolean

zoom on scroll default is false

onClick

(event: LeafletMouseEvent) => void

this handler will get called when the map is clicked

onZoomEnd

(event: LeafletEvent) => void

onDragEnd

(event: DragEndEvent) => void

mapUrl


The url of the tile server that will serve up map tiles. This url should have the following placeholders in them: {x}, {y} and {z}

{z} represents the current zoom level

type

string

mapUrl="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"

staticImage


A static image to use instead of a map layout. If you are using a static image, specify mapUrl as an empty string.

The static image consists of a url for the image and a width and height of the image. Note that the width and height values be relative - just that the ratio should be accurate.

type
staticImage={{url:'https://myserver/floor-plan.png',width:200,height:400}}

center


Where the map is centered.

type

{ position: IMarker, renderMarker?: boolean }

markers


A list of markers to render. Each marker has a latitude longitude and data field. The data field can store arbitrary data.

type

IMarker[]

onMarkerClick


This handler gets called whenever a marker is clicked on. The first parameter represents the marker element that was clicked on. The second parameter represents the data associated with the marker

type

(el: any, data: any) => void

regions


regions to show on map

type

IRegion[]

onRegionClick


this handler will get called when a region is clicked

type

(event: any, data: any) => void

heatmap


If you want to overlay a heatmap - assign this object with some valid value

type

zoom


The default zoom level to show on the map

type

number

maxZoom


max zoom level. optional. default is 19

type

number

minZoom


min zoom level. optional. default is -19

type

number

zoomOnScroll


zoom on scroll default is false

type

boolean

onClick


this handler will get called when the map is clicked

type

(event: LeafletMouseEvent) => void

onZoomEnd


type

(event: LeafletEvent) => void

onDragEnd


type

(event: DragEndEvent) => void

PreviousLocalizationFormModalNextModal

Last updated 9 months ago

IStaticImage
IHeatmapConfiguration
IStaticImage
IHeatmapConfiguration