Wrld.prop(name, geometryId, location, options)

// Create a prop showing a duck on the second floor of The Intercontinental Hotel, San Francisco
Wrld.prop("my_prop", "duck", Wrld.latLng(37.782084, -122.404578), { indoorMapId: "intercontinental_hotel_8626", indoorMapFloorId: 2 }).addTo(map);
Argument Type Description
name string A string indicating the name of this prop, this should be unique.
geometryId string A string identifying the 3D model to be rendered the geometry to be rendered. Available geometry is currently curated by WRLD, please get in touch via support@wrld3d.com to discuss additions.
location Wrld.LatLng A latitude, longitude pair describing the location at which the prop should be placed.
options object An object containing optional parameters, detailed below.

Options

Options Type Default Description
elevation number 0.0 Altitude above ground or sea level in meters.
elevationMode string ‘heightAboveGround’ Whether altitude is measured above ground level (“heightAboveGround”) or sea level (“heightAboveSeaLevel”).
indoorMapId string ’’ The id of the indoor map with which the Prop will be associated.
indoorMapFloorId number 0 The identifier of the indoor map floor on which the Prop should be displayed.
headingDegrees number 0.0 Controls the initial heading of the prop, where 0 is North and increases clockwise.

Methods

getElevation()

Returns the elevation in meters.

setElevation(elevation)

Set the elevation in meters.

Argument Type Description
elevation number The elevation in meters.

getElevationMode()

Returns the elevation mode.

setElevationMode(elevationMode)

Set the elevation mode.

Argument Type Description
elevationMode string Whether altitude is measured above ground level (“heightAboveGround”) or sea level (“heightAboveSeaLevel”).

getGeometryId()

Return the id of the geometry currently being displayed in the location described by the prop.

setGeometryId(geometryId)

Set the geometry id to select the 3D model that should be displayed in the location described by the prop.

Argument Type Description
geometryId string The id of the geometry to be displayed for the prop.

getHeadingDegrees()

Return the direction in which the prop faces, relative to North.

setHeadingDegrees(headingDegrees)

Set the direction in which the prop faces, relative to North.

Argument Type Description
headingDegrees number The heading of the prop in degrees, where degrees 0 is North and the angle increases clockwise.

getIndoorMapId()

Return the id of the indoor map in which this prop will be displayed.

getIndoorMapFloorId()

Return the id of the indoor map floor on which this prop will be displayed.

getLocation()

Return the Wrld.LatLng object representing the prop’s latitude and longitude.

setLocation(newLocation)

Set the Wrld.LatLng representing the prop’s latitude and longitude.

Argument Type Description
newLocation Wrld.LatLng The new location for the prop.

getName()

Return the string representing the name passed to the prop on creation.

v1.1.0
Props Wrld.Prop
Themes Wrld.themes
Heatmaps Wrld.Heatmap
Events Event objects
Services (Optional) WrldPoiApi