-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
82e6681
to
9439d9a
Compare
src/controls/utils/angle-utils.ts
Outdated
|
||
export const DEG_TO_RAD = Math.PI / 180; | ||
export const RAD_TO_DEG = 180 / Math.PI; | ||
export const MIN_TILT_DEG = 0; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
8f0d0a6
to
cf599ce
Compare
Add controls: