nypl-spacetime / Leaflet.GeotagPhoto

Leaflet plugin for photo geotagging
http://spacetime.nypl.org/Leaflet.GeotagPhoto/examples/camera.html
MIT License
70 stars 22 forks source link

Camera Draggable option #17

Open 00ricardo opened 4 years ago

00ricardo commented 4 years ago

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 hope you can help me!

00ricardo commented 4 years ago

Solution :)

camera ._cameraMarker.dragging.enable()
camera ._targetMarker.dragging.enable()
camera ._angleMarker.dragging.enable()
bertspaan commented 4 years ago

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.