Capturing the map click is fundamental skill in developing with Micello maps. The map click event sends information about the user's click to a callback function, including the click location and details about what was clicked. With this callback function developer can get access to this information and use it to make their application more interactive. Compared to v0 SDK, in v1 we have much more information related to user interaction.

First look at how to capture mapClick event.

community.on("indoorClick", function(e){
    // your code goes here
});

Your code will run every time you click on the map. Now if you do not want to run default SDK script on map click, just turn off interaction by setting property "interact" to false at the time of map load. Your final code will look something like this:

L.micello.loader.on("indoorReady", function (e) {
    community = L.micello.community ( 78, {
        key: apikey,
        interact: false, // This turns off all interactions with the click -- freeing the developer to do their own
    }).addTo(map);

    community.on("indoorClick", function(e){
        // your code goes here
    });
});

Some of many information that is available to you in callback functions are:

latlng: (object) location of click in latitude and longitude value

layerPoint: (object) click position on layer

indoor: (object) the clicked geometry or overlay object

If a geometry or overlay has been clicked, the 'clicked' object will contain several interesting properties which will be very useful while creating your custom application.