Some layers use coordId
s to store their data. A coordId
is always the result of the following formula:
var coordId = gridBasedX + gridBasedY * gridBasedWidth;
This means that you can get gridBasedY
from a coordId
like this:
var gridBasedY = Math.floor( coordId / gridBasedWidth );
var gridBasedX = coordId - gridBasedY * gridBasedWidth
Please note that grid based values are usually prefixed with a c
:
cx
/cy
for a grid based X/YcWid
/cHei
for a grid based width/height