Documentation

Popup by geometry address

Every geometry on Micello map has a unique geometry id and a geometry address attached to it. Refer Get geometry address link for more detail on loading geometry addresses. searchUnit function will search for the geometry address from the list, if match found it will get the geometry object from the geometry id associated to that geometry address.

Now, if geometry is on other level than the current level, we have to change the level. Loop through all the levels in drawing and if matching level is found set that level.

var lid = addressData.results[i].lid;
if(level.id != lid){            // change level if unit is on different level
    var drawing = mapDataObject.getCurrentDrawing();
    for(var j=0; j<drawing.l.length; j++){
        if(lid == drawing.l[j].id){
            mapDataObject.setLevel(drawing.l[j]);          
        }
    }
}

Search for Unit 301 or Unit 130 or Unit 396 and hit search button in below example.