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

Camera Draggable option #17

Open
00ricardo opened this issue May 10, 2020 · 2 comments
Open

Camera Draggable option #17

00ricardo opened this issue May 10, 2020 · 2 comments

Comments

@00ricardo
Copy link

Hello my friend, your plugin is really amazing, I am very interested in integrating it into my application.

I was wondering if there was any way I could keep the camera fixed. I mean, it would only be possible to drag the angle and the target and keep the camera fixed.

  • I tried to do this, but it didn't work, any ideas?
var camera = L.geotagPhoto.camera(points, options)
camera._cameraMarker.options.draggable = false;

I hope you can help me!

@00ricardo
Copy link
Author

00ricardo commented May 10, 2020

Solution :)

camera ._cameraMarker.dragging.enable()
camera ._targetMarker.dragging.enable()
camera ._angleMarker.dragging.enable()

@bertspaan
Copy link
Collaborator

If you want to use the draggable option, if should work like this:

var options = {
  draggable = false;
}

var camera = L.geotagPhoto.camera(points, options)

However, the draggable option accomplishes the opposite of what you want, the camera is fixed but the target is still draggable. There is currently no option to fix the camera location.

If you have time to submit a PR, you can add a new option yourself, I have no time to work on this unfortunately.

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

No branches or pull requests

2 participants