Options
All
  • Public
  • Public/Protected
  • All
Menu

@mappedin/react-native-sdk

Index

References

Mappedin

Renames and exports IMappedin

MappedinCategory

Renames and exports IMappedinCategory

MappedinEvent

Renames and exports IMappedinEvent

MappedinLocation

Renames and exports IMappedinLocation

MappedinMap

Renames and exports IMappedinMap

MappedinMapGroup

Renames and exports IMappedinMapGroup

MappedinNode

Renames and exports IMappedinNode

MappedinPolygon

Renames and exports IMappedinPolygon

MappedinVenue

Renames and exports IMappedinVenue

MappedinVortex

Renames and exports IMappedinVortex

Type aliases

MiMapView

MiMapView: (props: TMiMapViewProps) => React.ReactElement

Mappedin MapView component

Type declaration

MiMiniMap

MiMiniMap: (props: TMiMiniMapProps) => React.ReactElement

Mappedin MiniMap component

Type declaration

TBlueDotOptions

TBlueDotOptions: { allowImplicitFloorLevel?: boolean; showBearing?: boolean; smoothing?: boolean }

Type declaration

  • Optional allowImplicitFloorLevel?: boolean

    For venues that do not provide level updates, assume the user is always on the default map If this is false, and no level information is found from position updates, blueDotUpdate events will not include the nearest node This should probably be set true for single floor venues that have no level information in position updates

    defaultvalue

    false

  • Optional showBearing?: boolean

    Show Bearing

    defaultvalue

    false

  • Optional smoothing?: boolean

    Smooth incoming position updates. Set to false if smoothing happens outside the SDK

    defaultvalue

    true

TBlueDotUpdate

TBlueDotUpdate: { bearing: any; error: string; map: IMappedinMap; nearestNode: IMappedinNode; position: TGeolocationObject; state: any }

Type declaration

TCreateMarkerOptions

TCreateMarkerOptions: { anchor?: MARKER_ANCHOR; rank?: COLLISION_RANKING_TIERS }

Type declaration

TFocusOptions

TFocusOptions: { changeZoom?: boolean; curve?: any; duration?: number; focusZoomFactor?: number; minZoom?: number; nodes?: (IMappedinNode["id"] | IMappedinNode)[]; padding?: { bottom: number; left: number; right: number; top: number }; polygons?: (IMappedinPolygon["id"] | IMappedinPolygon)[]; tilt?: number }

Type declaration

  • Optional changeZoom?: boolean

    Whether to zoom the camera in or out, or just pan it.

    defaultvalue

    true

  • Optional curve?: any

    The animation curve to use for zooming in. Uses the animateCamera one by default.

  • Optional duration?: number

    The duration the focus animation should last for.

    defaultvalue

    100

  • Optional focusZoomFactor?: number

    You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.

  • Optional minZoom?: number

    Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.

    defaultvalue:

    0

  • Optional nodes?: (IMappedinNode["id"] | IMappedinNode)[]

    An array of Nodes to focus in on

  • Optional padding?: { bottom: number; left: number; right: number; top: number }
    • bottom: number
    • left: number
    • right: number
    • top: number
  • Optional polygons?: (IMappedinPolygon["id"] | IMappedinPolygon)[]

    An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.

  • Optional tilt?: number

    Camera tilt

TGeolocationObject

TGeolocationObject: { coords: { accuracy: number; floorLevel?: number; latitude: number; longitude: number }; positionIndex?: number; timestamp: number; type?: GEOLOCATION_STATUS }

Type declaration

  • coords: { accuracy: number; floorLevel?: number; latitude: number; longitude: number }
    • accuracy: number
    • Optional floorLevel?: number
    • latitude: number
    • longitude: number
  • Optional positionIndex?: number
  • timestamp: number
  • Optional type?: GEOLOCATION_STATUS

TGetVenueBundleOptions

TGetVenueBundleOptions: TGetVenueOptions & { bundleBaseUri?: string; useBundleAssets?: boolean; version?: string }

TGetVenueOptions

TGetVenueOptions: { accessToken?: string; baseUrl?: string; clientId?: string; clientSecret?: string; headers?: {[ key in string]: string }; includeHidden?: boolean; language?: string; noAuth?: boolean; perspective?: string; things?: any; venue: string }

Type declaration

  • Optional accessToken?: string
  • Optional baseUrl?: string
  • Optional clientId?: string
  • Optional clientSecret?: string
  • Optional headers?: {[ key in string]: string }
  • Optional includeHidden?: boolean
  • Optional language?: string
  • Optional noAuth?: boolean
  • Optional perspective?: string
  • Optional things?: any
  • venue: string

TJourneyOptions

TJourneyOptions: { connectionTemplate?: TConnectionTemplateFn; pathOptions?: TPathOptions }

Type declaration

  • Optional connectionTemplate?: TConnectionTemplateFn

    Template to use for connection tooltips

  • Optional pathOptions?: TPathOptions

    Path Options

TLabelOptions

TLabelOptions: { activeColor?: string; color?: string; inactiveColor?: string; markerBuffer?: number; markerSize?: number; maxTextDivWidth?: number; rank?: number; shortText?: string; stateText?: string; text: string; textLines?: number; textSize?: number }

Type declaration

  • Optional activeColor?: string
  • Optional color?: string
  • Optional inactiveColor?: string
  • Optional markerBuffer?: number
  • Optional markerSize?: number
  • Optional maxTextDivWidth?: number
  • Optional rank?: number
  • Optional shortText?: string
  • Optional stateText?: string
  • text: string
  • Optional textLines?: number
  • Optional textSize?: number

TMappedinDirective

TMappedinDirective: { action?: IAction; atLocation?: IMappedinVortex; distance: number; instruction: string; node: IMappedinNode; type?: BEARING_TYPE }

this is the "overloaded" version of the directive, with get-venue classes instead of stubs

Type declaration

  • Optional action?: IAction
  • Optional atLocation?: IMappedinVortex
  • distance: number

    Distance from the last instruction to the current. Useful for turn by turn navigation

  • instruction: string
  • node: IMappedinNode
  • Optional type?: BEARING_TYPE

TMiMapViewOptions

TMiMapViewOptions: TShowVenueOptions & { baseUrl?: string; clientId?: string; clientSecret?: string; language?: string; noAuth?: boolean; perspective?: string; venue: string }

TMiMapViewProps

TMiMapViewProps: { onBlueDotUpdated?: (prop: { update: TBlueDotUpdate }) => void; onDataLoaded?: (prop: { venueData: IMappedin }) => void; onFirstMapLoaded?: () => void; onMapChanged?: (prop: { map: IMappedinMap }) => void; onNothingClicked?: () => void; onPolygonClicked?: (prop: { polygon: IMappedinPolygon }) => void; onStateChanged?: (prop: { state: STATE }) => void; options: TMiMapViewOptions; ref: React.ForwardedRef<MapViewStore>; style?: any; venueData?: IMappedin }

Type declaration

  • Optional onBlueDotUpdated?: (prop: { update: TBlueDotUpdate }) => void

    Called when blue dot is updated

  • Optional onDataLoaded?: (prop: { venueData: IMappedin }) => void

    Called when data is loaded for this venue

  • Optional onFirstMapLoaded?: () => void

    Called when the map is ready for interaction

      • (): void
      • Returns void

  • Optional onMapChanged?: (prop: { map: IMappedinMap }) => void

    Called when the map changes

  • Optional onNothingClicked?: () => void

    Called when clicking outside any interactive polygons

      • (): void
      • Returns void

  • Optional onPolygonClicked?: (prop: { polygon: IMappedinPolygon }) => void

    Called when an interactive polygon is clicked

  • Optional onStateChanged?: (prop: { state: STATE }) => void

    Called when the SDK state changes

      • (prop: { state: STATE }): void
      • Parameters

        Returns void

  • options: TMiMapViewOptions

    Options to initialze MiMapView with

  • ref: React.ForwardedRef<MapViewStore>

    The MapViewStore instance will be returned here

  • Optional style?: any
  • Optional venueData?: IMappedin

    Venue Data to render inside the MapView. This is returned by getVenue

TMiMiniMapProps

TMiMiniMapProps: { focusOptions?: (props: TFocusOptions) => void; location: IMappedinLocation["id"] | IMappedinLocation; onLoad?: () => void; options: TMiMapViewOptions; polygonHighlightColor?: string; style?: any; venueData?: IMappedin }

Type declaration

TPathOptions

TPathOptions: { color?: number; displayArrowsOnPath?: boolean; drawDuration?: number; farRadius?: number; farZoom?: number; nearRadius?: number; nearZoom?: number; pulseColor?: string; pulseIterations?: number; pulsePauseDuration?: number; radius?: number }

Type declaration

  • Optional color?: number

    Path Colour

    defaultvalue

    0xff834c

  • Optional displayArrowsOnPath?: boolean

    Show arrows on path

    defaultvalue

    false

  • Optional drawDuration?: number

    Duration of path drawing

    defaultvalue

    1500

  • Optional farRadius?: number

    Radius of path at furthest zoom

    defaultvalue

    20

  • Optional farZoom?: number

    Zoom level where the path size is farRadiustions.nearRadius

    defaultvalue

    10000

  • Optional nearRadius?: number

    Radius of path at nearest zoom

    defaultvalue

    20

  • Optional nearZoom?: number

    Zoom level where the path size is nearRadius

    defaultvalue

    375

  • Optional pulseColor?: string

    Colour of path pulse

    defaultvalue

    0xffffff

  • Optional pulseIterations?: number

    Number of iterations to pulse to indicate direction

    defaultvalue

    Infinity

  • Optional pulsePauseDuration?: number

    How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path

    defaultvalue

    750

  • Optional radius?: number

    (Deprecated) alias for nearRadiusty

    defaultvalue

    20

    deprecated

TShowVenueOptions

TShowVenueOptions: { backgroundAlpha?: number; backgroundColor?: string; firstMapId?: string; labelAllLocationsOnInit?: boolean }

Type declaration

  • Optional backgroundAlpha?: number

    The opacity of the initial background color.

  • Optional backgroundColor?: string

    Sets the initial background color of the map, including while loading.

  • Optional firstMapId?: string

    The id of the first map to show on map load

  • Optional labelAllLocationsOnInit?: boolean

    Whether or not to display labels initially

Component Variables

MiMapView

MiMapView: MemoExoticComponent<ForwardRefExoticComponent<Pick<TMiMapViewProps, "options" | "venueData" | "style" | "onPolygonClicked" | "onBlueDotUpdated" | "onDataLoaded" | "onNothingClicked" | "onFirstMapLoaded" | "onMapChanged" | "onStateChanged"> & RefAttributes<MapViewStore>>>

MiMiniMap

MiMiniMap: NamedExoticComponent<TMiMiniMapProps>

Mappedin MiniMap component

Functions

getVenue

getVenueBundle