Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add control of rotation and tilt to the map #1

Merged
merged 8 commits into from
Apr 10, 2024

Conversation

matthew44-mappable
Copy link
Contributor

Add controls:

  • MMapRotateControl - the control for rotating the map
  • MMapTiltControl - the control to tilt the map
  • MMapRotateTiltControl - a combined control for tilting and rotating the map

@matthew44-mappable matthew44-mappable requested review from xdan and shtyr-maxim and removed request for xdan and shtyr-maxim February 26, 2024 12:55

export const DEG_TO_RAD = Math.PI / 180;
export const RAD_TO_DEG = 180 / Math.PI;
export const MIN_TILT_DEG = 0;
Copy link

@flapenguin-mappable flapenguin-mappable Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those must be taken from MMap.

import {MMapCameraRequest} from '@mappable-world/mappable-types/imperative/MMap';
import type {MMapRotateTiltControlProps} from '.';
import {
CLICK_TOLERANCE_PX,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is CLICK_TOLERANCE_PX in angle-utils?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because CLICK_TOLERANCE_PX is needed in both tilt controls (MMapTiltControl and MMapRotateTiltControl). I have not found another place where I can declare this variable and export it to both controls.

@matthew44-mappable matthew44-mappable merged commit f961dd5 into main Apr 10, 2024
1 check passed
@matthew44-mappable matthew44-mappable deleted the rotate-tilt-control branch April 10, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants