L.popup(options, source)

wrld.js requires that users create instances of L.Popup via the standard Leaflet factory (see creation example below).

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

// 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.ILayer An optional ILayer to associate this popup with.


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.



Returns the elevation of the popup in meters.


Set the elevation of the popup.

Argument Type Description
elevation number The elevation of the popup in meters.
Props L.Wrld.Prop
Themes L.Wrld.themes
UI Layers L.Marker L.Popup
Heatmaps L.Wrld.Heatmap
Events Event objects
Services (Optional) WrldPoiApi