function getCenterWithHeading(position, rotation, resolution) {
  const size = map.getSize();
  const height = size[1];

  return [
    position[0] - Math.sin(rotation) * height * resolution * 1 / 4,
    position[1] + Math.cos(rotation) * height * resolution * 1 / 4
  ];
}
function getCenterWithHeading(position, rotation, resolution) {
  const size = map.getSize();
  const height = size[1];

  return [
    position[0] - Math.sin(rotation) * height * resolution * 1 / 4,
    position[1] + Math.cos(rotation) * height * resolution * 1 / 4
  ];
}
function getCenterWithHeading ( position , rotation , resolution ) { const size = map . getSize ( ) ; const height = size [ 1 ] ; return [ position [ 0 ] - Math . sin ( rotation ) * height * resolution * 1 / 4 , position [ 1 ] + Math . cos ( rotation ) * height * resolution * 1 / 4 ] ; }
recenters the view by putting the given coordinates at 3/4 from the top or the screen
recenters the view by putting the given coordinates at 3 / 4 from the top or the screen
Get center of the block with heading