Not able to show details for the point using getResultRowForPixel() function as its not working as expected


#1

Hi,
I am trying to use getResultRowForPixel() function as described in the following documentation.
https://omnisci.github.io/mapd-connector/docs/#getresultrowforpixel

I am invoking it after render_vega call with the following code block -

const pixel:any = {"x": 394, "y":311}; 
const callback = (x: any)=>console.log(x); 
const cols: any = {"points":["NAME"]};

conn.getResultRowForPixel( 
1, 
pixel 
, 
cols 
, 
[ 
function(err :any, results:any) { 
if (err) { 
throw new Error( 
`getResultRowForPixel failed with message: ${err.message}` 
) 
} else { 
return callback(results[0]) 
} 
} 
],

); 

Which is always returing 0 data in row_set object.

Pixel parameter passed is as per the documentation offesetX and offsetY of mousedown event of a div.

For a note, we are using our own map and using render_vega to plot points on our map.
And we are very certain about the presence of data on the particular pixel (to make sure this we ran the function with multiple nearby pixel values without single success)

Please let me know the possible resolution for the problem.