If you wanted to sync up with the Hexy map, you could use the hex functions in the MapGenUtil.lua. Instead of using x,y coord in your maze, you'd just use q,r coords. It takes a bit to wrap your head around, but its really cool :-P. This is the hex-grid bible that I used as a guide https://www.redblobgames.com/grids/hexagons/#rounding
Aligning to the boxy square grid would likely be easier. I think you should be able to use the code more or less directly.
This line
local center = util.square_center(x,y, 10 * land_pattern_scale_multiplier())
should get you an x,y for the current 'square'. So if your squares were 100x100, and x,y = (33,57) then center would = {50,50} I think.
So instead of using chunk boundaries (which I think is what you are doing) you would have to use the xy coords and align to the same grid as boxy.