Find geometry from position

Micello javascript API provides a way to identify geometry from a given Micello coordinates. You can use the hitCheck method in the mapCanvas object.

Here is the brief description on how to use the function.

geom = mapCanvas.hitCheck(<array of geometry objects>, x,y);

This functions accepts three parameters, first parameter is array of geometry objects. This function will search within the geometry array to see if next two parameters which indicates Micello x & y values are on one of the geometries or not. Here, level.g holds the array list of all the geometries available on the current level.

var level = mapDataObject.getCurrentLevel();
geom = mapCanvas.hitCheck(level.g, mx, my);

Enter mx and my values in below example and hit 'Find Geometry' button to see if any geometry gets highlighted or not.