Logo
Developer

VisioWeb 1.17.1

Class

visioweb.POI

Mapviewer's POI class.
This object should be obtained from the Mapviewer's getPOI and getPOIs methods.
POI objects correspond to identified images and texts in the map.

While surfaces can also be linked to an ID, they will materialize as Place objects in the data prepared for VisioWeb.

Constructor

new POI()

This object should be constructed from the Mapviewer's addPOI method.
See:

Methods summary


Name Description
hide Hides the POI object in the 3D scene. Same as calling poi.options('visible', false).
options Use this method to get or change a POI option. The POIs can be those created directly via .addPOI or those on the map retrieved via getPOI or getPOIs.
remove This method is called to remove a POI from the scene. If it is has a div (selector) attached, the selector's css will simply be set display: none.
show Makes the POI visible in the 3D scene. Same as calling poi.options('visible', true).

Methods detail

hide()

Hides the POI object in the 3D scene. Same as calling poi.options('visible', false).

options(option, value, skipRedraw) → {Object|string}

Use this method to get or change a POI option. The POIs can be those created directly via .addPOI or those on the map retrieved via getPOI or getPOIs.
Parameters:
Name Type Description
option string | object the option name; valid names are all the options available to .addPOI(). If not specified return the options that were used to create the POI. if specified as an object, it expect multiple options like {text: 'updated', angle: 45, fixed: true}
value string the option value to set. If not specified return the option value.
skipRedraw boolean
Since:
  • 1.7.19 multiple options can be passed at once.
See:
Returns:
if no value is given, it will return the current value for that option.
Type
Object | string
Examples
poi.options('visible',false);
    // or
    poi = mapviewer.addPOI({text: "hello", position: {x: 0.6, y: 0.5}, visible: false})
    poi.options({visible: true, position: {x: 0.5, y: 0.5}});
// get the position and floor of a specific POI
var pois = mapviewer.getPOIs();
var position;
var floor;
if (pois['toilet1'] && pois['toilet1'].length > 0) {
    var options = pois['toilet1'][0].options();
    floor = options.floor;
    position = options.position;
}

remove()

This method is called to remove a POI from the scene. If it is has a div (selector) attached, the selector's css will simply be set display: none.

show()

Makes the POI visible in the 3D scene. Same as calling poi.options('visible', true).