mouseClickContainer

Sent when the user has clicked on a container.

Warning

You need to enable setMouseListener before using mouseClickContainer event:

FnoMapManager.sendEvent('setMouseListener', {state: true});

Result

Name

Type

Description

container

Container

The container clicked

const fnoToken = "<YOUR-FNO-TOKEN>"; // provide from backoffice
const fnoMapId = "<MAP-ID>" // id of the map to load
let FnoMapManager;

// wait page is loaded
window.addEventListener("load", function(){
// sdk is definied in the global variable "FnoMapManager" in window object
FnoMapManager = window.FnoMapManager;
FnoMapManager.initViewerMode(fnoToken);
FnoMapManager.loadMap(idMap, 'MapContainer', function(){
// enable mouse event listener
FnoMapManager.sendEvent('setMouseListener', {state: true});
// register event once map is loaded
FnoMapManager.registerEvent('mouseClickContainer' ,(data) => {
console.log("click event", data);
});
})
});


On This Page
mouseClickContainer