function changePostionByClickButton(latLng, offset, eventType, positionType) {
  switch (positionType) {
    case eventType === "click" ? "up" : "ArrowUp":
      return { x: latLng.x, y: latLng.y - offset };
    case eventType === "click" ? "down" : "ArrowDown":
      return { x: latLng.x, y: latLng.y + offset };
    case eventType === "click" ? "left" : "ArrowLeft":
      return { x: latLng.x - offset, y: latLng.y };
    case eventType === "click" ? "right" : "ArrowRight":
      return { x: latLng.x + offset, y: latLng.y };
    default:
      return latLng;
  }
}
Change position of latlng by click button

@param {Object} latLng
@param {String} positionType
@param {Number} offset
@returns object