Represents information about an identifiable feature on an indoor map.

IndoorMapEntity objects can be obtained by creating an Wrld.indoorMapEntities.IndoorMapEntityInformation object and adding it to the map.

An IndoorMapEntity corresponds to a feature within a level GeoJSON in an indoor map submission via the WRLD Indoor Map REST API.

See https://github.com/wrld3d/wrld-indoor-maps-api/blob/master/FORMAT.md for further information about specifying entity information for indoor maps.


Method Returns Description
getIndoorMapEntityId() string Returns a string identifier of this indoor map entity. This identifier is expected to be unique across all indoor map entities for a single indoor map.
getIndoorMapFloorId() number Returns the identifier of an indoor map floor on which this indoor map entity is positioned.
getPosition() Wrld.LatLng Returns the location of this indoor map entity. Although indoor map entities can represent area features such as rooms or desks, this position provides a point that is in the center of the feature. As such, it is suitable for use if locating a Marker for this entity, or if positioning the camera to look at this entity.
getOutline() <Outline Polygon> Returns the outline polygon of the entity if outline information is available, else returns an empty array.

Outline Polygons

Entity outline polygons are available for highlightable indoor map entities submitted during indoor map creation via the WRLD Indoor Map REST API. These correspond to Level GeoJSON area feature entries with attribute highlight:true.

An outline polygon is represented as a two-deep nested array of Wrld.LatLng coordinates, as suitable for constructing a <Wrld.Polygon> or [<Wrld.native.Polygon>][WrldPolygon] object. The first inner array specifies the exterior (outer) ring of vertices, with any subsequent inner arrays specifying interior (hole) rings. Vertex ring arrays are clockwise ordered.

For example: Polygon without holes

    [37.786617, -122.404654],
    [37.797843, -122.407057],
    [37.798962, -122.398260],
    [37.794299, -122.395234]

For example: Polygon with holes

  [[37.786617, -122.404654], //outer ring
  [37.797843, -122.407057],
  [37.798962, -122.398260],
  [37.794299, -122.395234]],

  [[37.795168, -122.402665], //hole
  [37.792300, -122.403781],
  [37.792656, -122.400420]],

  [[37.790979, -122.403028], //another hole
  [37.790404, -122.401272],
  [37.788705, -122.402579],
  [37.789706, -122.403516]]

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