Skip to Content
APIPlaces LocationsClass: MVXPlace

Class: MVXPlace

MapVX place object, is a custom object containing data of a specific real place. Represents a physical location with all its associated metadata and properties.

Example

const place = new MVXPlace(placeResponse) console.log(place.title) // "Coffee Shop" console.log(place.position) // { lat: 40.7128, lng: -74.0060 }

Constructors

Constructor

new MVXPlace(rawPlace): MVXPlace;

Creates a new place instance with the parameters specified in the data.

Parameters

rawPlace

PlaceResponse

JSON configuration parameters for the place from API response

Returns

MVXPlace

A new instance of MVXPlace

Example

const placeResponse = await fetchPlaceData(placeId) const place = new MVXPlace(placeResponse)

Methods

inFloor()

inFloor(parentPlaceFloors): undefined | InnerFloor;

Returns the floor in which the place exists as an InnerFloor object. If no matching available floor is found or if the place is not indoor, an undefined value will be returned.

Parameters

parentPlaceFloors

InnerFloor[]

Array of existing parent place floors to search in

Returns

undefined | InnerFloor

The matching InnerFloor object or undefined if not found

Example

const buildingFloors = getBuildingFloors() const placeFloor = place.inFloor(buildingFloors) if (placeFloor) { console.log(`Place is on floor: ${placeFloor.name}`) }

toString()

toString(): string;

Returns a string representation of the place

Returns

string

String in format “MVXPlace {mapvxId}“

Properties

address?

optional address: string;

Physical address of the place in plain text (if provided)


banners

banners: Banner[];

List of available banner images for the place

See

Banner for banner structure


category

category: string

Category identifier for the place


clientId?

optional clientId: string;

Client-side identifier for the place (optional) Used for custom identification in client applications


description?

optional description: string;

Detailed description text for the place (localized based on client language)


generalCategory

generalCategory: string

General purpose category string for the place (localized)


hidePlace

hidePlace: boolean

Flag to control visibility of the place in search results


images

images: string[];

List of available image URLs for the place


inFloors?

optional inFloors: string[];

Specific floor identifiers where this place exists (for indoor locations)


innerFloors

innerFloors: InnerFloor[];

Floors available in the parent place. If this exists, the place is indoor. Otherwise, the place is considered outdoor.

See

InnerFloor for floor structure


localizedCategory?

optional localizedCategory: string;

Localized category name for the place (based on client language)


optional logo: string;

URL of the place’s logo image


mapvxId

mapvxId: string

Unique identifier to reference the place in MapVX system


metadata?

optional metadata: Metadata;

Metadata of the place.


openingHours?

optional openingHours: OpeningHours;

Business hours when the place is open

See

OpeningHours for schedule structure


parentId

parentId: string

Unique identifier of the parent place or object


parentInstitutionId

parentInstitutionId: string

Unique identifier of the institution to which this place belongs


parentType

parentType: string

Type of the object being referenced by parentId


position

position: LatLng

Central position coordinates for the place

See

LatLng for coordinate structure


properties?

optional properties: Property[];

List of properties connected to the place

See

Property for property structure


shortDescription?

optional shortDescription: string;

Short description text for the place (localized based on client language)


tags

tags: string[];

Tags associated with the place for categorization and filtering


title

title: string

Title text for the place (localized based on client language)


transportLine?

optional transportLine: TransportLine[];

Transport services associated with this place

See

TransportLine for transport service structure


visibility

visibility: "public" | "protected" | "hidden"

Visibility of the place

Last updated on