Nevermind, I solved it by resize the scroll bound to the size of the camera and center it around the tilemap like this:
public static function setZoom(newZoom:Float, tilemap:FlxTilemap) { var camera = FlxG.camera; camera.zoom = newZoom; camera.setSize(cast FlxG.width / newZoom, cast FlxG.height / newZoom); camera.setCenter(DPosUtil.screenCenter); var scrollBound = FlxRect.get(0, 0, camera.width, camera.height); scrollBound.setCenter(tilemap.getCenter()); camera.setScrollBoundsRect(scrollBound.x, scrollBound.y, scrollBound.width, scrollBound.height); }