Skip to content

Documentation / @expofp/floorplan / FloorPlan

Interface: FloorPlan ​

Represents a floor plan.

Properties ​

allowConsent ​

ts
readonly allowConsent: boolean | undefined;

Deprecated ​

The consent decision lives on the config — set the consent option instead. true ⇄ 'granted', false ⇄ 'denied', undefined ⇄ 'ask'.


element ​

ts
readonly element: HTMLDivElement;

eventId ​

ts
readonly eventId: string;

noOverlay ​

ts
readonly noOverlay: boolean;

offHistory ​

ts
readonly offHistory: boolean;

onInit ​

ts
readonly onInit: (fp) => void;

Parameters ​

fp ​

FloorPlan

Returns ​

void


onLeaveEvent? ​

ts
optional onLeaveEvent?: () => void;

Returns ​

void


ready ​

ts
readonly ready: Promise<void>;

Resolves once the plan has mounted and its API is live.

Rejects if destroy is called first: the initialization it was waiting on has been cancelled, so awaiting it any longer would never return. Await it inside the same chain that owns the teardown, or attach a catch — an unhandled rejection here is a destroyed plan, not a failure to load.

Methods ​

activateFloor() ​

ts
activateFloor(floorId): void;

Parameters ​

floorId ​
index? ​

number

name? ​

string

Returns ​

void


applyParameters() ​

ts
applyParameters(queryRaw): void;

Parameters ​

queryRaw ​

string

Returns ​

void


boothsList() ​

ts
boothsList(): FloorPlanBooth[];

Returns ​

FloorPlanBooth[]


categoriesList() ​

ts
categoriesList(): FloorPlanCategory[];

Returns ​

FloorPlanCategory[]


changeLanguage() ​

ts
changeLanguage(langId): void;

Parameters ​

langId ​

string

Returns ​

void


convertToGeo() ​

ts
convertToGeo(x, y): [number, number];

Parameters ​

x ​

number

y ​

number

Returns ​

[number, number]


deselectCurrentPosition() ​

ts
deselectCurrentPosition(): void;

Returns ​

void


deselectRoute() ​

ts
deselectRoute(): void;

Returns ​

void


destroy() ​

ts
destroy(): void;

Tears the floor plan down: unmounts the UI, drops the window listeners, analytics, URL sync and map resources it installed, and empties the container element — the element itself is left in the document, ready to be passed to a new load call.

Safe at any point in the lifecycle: calling it before ready resolves cancels the pending initialization instead of throwing, so a single-page app can unmount a route while the plan is still loading. That cancellation rejects ready rather than leaving it pending forever. Calling it more than once does nothing after the first.

The instance is spent once destroyed — call load again for a new plan rather than reusing it.

Returns ​

void


exhibitorsList() ​

ts
exhibitorsList(): FloorPlanExhibitor[];

Returns ​

FloorPlanExhibitor[]


findLocation() ​

ts
findLocation(): void;

Returns ​

void


fitBounds() ​

Call Signature ​

ts
fitBounds(): void;
Returns ​

void

Call Signature ​

ts
fitBounds(bounds, options?): void;
Parameters ​
bounds ​

Bounds

options? ​
padding? ​

number

Returns ​

void


getBoothRect() ​

ts
getBoothRect(name): Rect;

Parameters ​

name ​

string

Returns ​

Rect


getBounds() ​

ts
getBounds(selectors): Bounds | undefined;

Parameters ​

selectors ​

POISelectors

Returns ​

Bounds | undefined


getCamera() ​

ts
getCamera(): Camera;

The camera state last requested via setCamera (or the equivalent URL parameters) — not a live gesture-tracking camera: panning or zooming by hand does not update it.

Returns ​

Camera


getCenterCoordinates() ​

ts
getCenterCoordinates(): FloorPlanGetCoordsEvent;

Returns ​

FloorPlanGetCoordsEvent


getFloors() ​

ts
getFloors(): Floor[];

Returns ​

Floor[]


getGeoConfig() ​

ts
getGeoConfig(): GeoConfig | null;

Returns ​

GeoConfig | null


getOptimizedRoutes() ​

ts
getOptimizedRoutes(waypoints): RouteInfo[];

Parameters ​

waypoints ​

RouteWaypoint[]

Returns ​

RouteInfo[]


getVisibility() ​

ts
getVisibility(): Visibility;

Returns ​

Visibility


hidePathways() ​

ts
hidePathways(): void;

Returns ​

void


highlightBooths() ​

ts
highlightBooths(externalIds): void;

Parameters ​

externalIds ​

string[]

Returns ​

void


highlightExhibitors() ​

ts
highlightExhibitors(externalIds): void;

Parameters ​

externalIds ​

string[]

Returns ​

void


isGpsTrackingEnabled() ​

ts
isGpsTrackingEnabled(): boolean;

Returns ​

boolean


onBookmarkClick() ​

ts
onBookmarkClick(e): void;

Parameters ​

e ​

FloorPlanBookmarkClickEvent

Returns ​

void


onBoothClick() ​

ts
onBoothClick(e): void;

Parameters ​

e ​

FloorPlanBoothClickEvent

Returns ​

void


onCategoryClick() ​

ts
onCategoryClick(e): void;

Parameters ​

e ​

FloorPlanCategory

Returns ​

void


onCurrentPositionChanged() ​

ts
onCurrentPositionChanged(point): void;

Parameters ​

point ​

CurrentPosition

Returns ​

void


onDetails() ​

ts
onDetails(e): void;

Parameters ​

e ​

FloorPlanDetailsEvent

Returns ​

void


onDirection() ​

ts
onDirection(e): void;

Parameters ​

e ​

FloorPlanDirectionEvent | null

Returns ​

void


onExhibitorCustomButtonClick() ​

ts
onExhibitorCustomButtonClick(e): void;

Parameters ​

e ​

FloorPlanCustomButtonEvent

Returns ​

void


onFloorActivated() ​

ts
onFloorActivated(floor): void;

Parameters ​

floor ​

Floor

Returns ​

void


onFpConfigured() ​

ts
onFpConfigured(): void;

Returns ​

void

Deprecated ​

The onFpConfigured method is deprecated. Use onInit instead.


onGetCoordsClick() ​

ts
onGetCoordsClick(e): void;

Parameters ​

e ​

FloorPlanGetCoordsEvent

Returns ​

void


onMarkerClick() ​

ts
onMarkerClick(e): void;

Parameters ​

e ​

FloorPlanMarkerEvent

Returns ​

void


onVisitedClick() ​

ts
onVisitedClick(e): void;

Parameters ​

e ​

FloorPlanVisitedClickEvent

Returns ​

void


openPlanner() ​

ts
openPlanner(options?): void;

Opens the route planner, optionally pre-filled with slugs or the visitor's bookmarks.

Parameters ​

options? ​
from? ​

string

fromBookmarks? ​

boolean

items? ​

string[]

Returns ​

void


reset() ​

ts
reset(): void;

Returns ​

void


ts
search(term): Promise<object[]>;

Parameters ​

term ​

string

Returns ​

Promise<object[]>


select() ​

ts
select(slugOrExternalId): void;

Opens whatever the slug or external id names — a booth, a schedule session, an exhibitor, a category or a speaker (checked in that order); anything else opens the search list with the value as the search text. The programmatic twin of the ?<slug> deep link.

Parameters ​

slugOrExternalId ​

string

Returns ​

void


selectAccessibleRoute() ​

ts
selectAccessibleRoute(waypoints): void;

Same as selectRoute, but restricts the path to accessible segments only.

Parameters ​

waypoints ​

RouteWaypoint[]

Ordered route stops (booth name/ID or CurrentPosition).

Returns ​

void


selectBooth() ​

ts
selectBooth(nameOrExternalId): void;

Parameters ​

nameOrExternalId ​

string

Returns ​

void


selectCategory() ​

ts
selectCategory(nameOrSlug?): void;

Parameters ​

nameOrSlug? ​

string

Returns ​

void


selectCurrentPosition() ​

ts
selectCurrentPosition(
   point, 
   focus, 
   icon?): void;

Parameters ​

point ​

CurrentPosition

focus ​

boolean

icon? ​

number

Returns ​

void


selectExhibitor() ​

ts
selectExhibitor(nameOrExternalId): void;

Parameters ​

nameOrExternalId ​

string

Returns ​

void


selectRoute() ​

Call Signature ​

ts
selectRoute(from, to): void;
Parameters ​
from ​

RouteWaypoint

to ​

RouteWaypoint

Returns ​

void

Call Signature ​

ts
selectRoute(waypoints): void;
Parameters ​
waypoints ​

RouteWaypoint[]

Returns ​

void


selectTour() ​

ts
selectTour(tourId): void;

Launches the tour with the given id; unknown ids fall back to the tours list.

Parameters ​

tourId ​

string

Returns ​

void


setBookmarks() ​

ts
setBookmarks(bookmarks): void;

Parameters ​

bookmarks ​

object[]

Returns ​

void


setCamera() ​

ts
setCamera(camera): void;

Moves the camera. Partial-merge semantics: only the fields present in camera change, omitted ones keep their current values — e.g. setCamera({ bearing: 90 }) rotates the map without moving its center. The center is set either as floor-plan projected coordinates (x/y) or as GPS (lat/lng) — each is a pair, so both halves must be given. floor activates the named floor, bearing rotates the map (0–360°) and zoomTime sets the camera animation duration in milliseconds. Applied as soon as the renderer is ready. Also available as the setCamera intent (URL deep link).

Parameters ​

camera ​

Camera

Returns ​

void


setEntitiesBookmarks() ​

ts
setEntitiesBookmarks(bookmarks): void;

Parameters ​

bookmarks ​

object[]

Returns ​

void


setEntitiesVisited() ​

ts
setEntitiesVisited(entities): void;

Parameters ​

entities ​

object[]

Returns ​

void


setGpsTrackingEnabled() ​

ts
setGpsTrackingEnabled(value): void;

Parameters ​

value ​

boolean

Returns ​

void


setMarkers() ​

ts
setMarkers(markersData): void;

Parameters ​

markersData ​

MarkersData

Returns ​

void


setVisibility() ​

ts
setVisibility(visibility): void;

Parameters ​

visibility ​

Visibility

Returns ​

void


showList() ​

ts
showList(list): void;

Opens one of the named list panels (the ?bookmarks, ?sessions, … deep links).

Parameters ​

list ​

| "language" | "exhibitors" | "bookmarks" | "sessions" | "speakers" | "tours" | "visited"

Returns ​

void


showPathway() ​

ts
showPathway(pathwayId, externalIds): void;

Parameters ​

pathwayId ​

string

externalIds ​

string[]

Returns ​

void


showPathwayOnly() ​

ts
showPathwayOnly(pathwayId, floorId): void;

Parameters ​

pathwayId ​

string

floorId ​

string

Returns ​

void


showSearch() ​

ts
showSearch(): void;

Returns ​

void


startBuildRoute() ​

ts
startBuildRoute(): void;

Enters the interactive route-building mode.

Returns ​

void


switchView() ​

ts
switchView(): void;

Returns ​

void


unstable_destroy() ​

ts
unstable_destroy(): void;

Returns ​

void

Deprecated ​

Renamed to destroy, which carries the same behaviour plus a stable contract. This alias will be removed in a future major.


updateLayerVisibility() ​

ts
updateLayerVisibility(layer, visible): void;

Parameters ​

layer ​

string

visible ​

boolean

Returns ​

void


zoomIn() ​

ts
zoomIn(): void;

Returns ​

void


zoomOut() ​

ts
zoomOut(): void;

Returns ​

void


zoomTo() ​

ts
zoomTo(selectors, options?): void;

Parameters ​

selectors ​

POISelectors

options? ​
padding? ​

number

Returns ​

void