Wrld.popup(options, source)

Extends: L.Popup

// Create a popup with the text "Transamerica Pyramid" above the Transamerica Pyramid
Wrld.popup({ elevation: 260.0 })
       .setLatLng([37.7952, -122.4028])
       .setContent("Transamerica Pyramid")
       .addTo(map);

// Alternatively:
map.openPopup("Transamerica Pyramid", [37.7952, -122.4028], { elevation: 260.0 });
Argument Type Description
options object These are the same options you would pass to L.Popup, plus additional wrld.js entries.
source L.Layer An optional Layer to associate this popup with.

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 Popup will be associated.
indoorMapFloorId number 0 The identifier of the indoor map floor on which the Popup should be displayed. In the WRLD Indoor Map Format, this corresponds to the ‘z_order’ field of the Level object.

Methods

popup.getElevation()

Returns the elevation of the popup in meters.

popup.setElevation(elevation)

Set the elevation of the popup.

Argument Type Description
elevation number The elevation of the popup in meters.
v1.1.0
Props Wrld.Prop
Themes Wrld.themes
Heatmaps Wrld.Heatmap
Events Event objects
Services (Optional) WrldPoiApi