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

Add readonly option #6

Closed bertspaan closed 7 years ago

bertspaan commented 7 years ago

in docs of this option, add link to http://gis.stackexchange.com/questions/54454/disable-leaflet-interaction-temporary/54925#54925

bertspaan commented 7 years ago

First, do #5.

bertspaan commented 7 years ago

@mmmenno: let me know when you need this.

mmmenno commented 7 years ago

We don't need this until the first project has been crowdsourced (in 2-3 months, i guess).

It would be nice, however, to know beforehand what parameters the readonly version expects: the fieldOfView geojson? Or cameraPoint, targetPoint and angle?

We've been thinking about what to save in our Leiden project, and came up with:

What do you save for NYPL projects?

bertspaan commented 7 years ago

The initialization function of the camera module will accept the following GeoJSON features: https://github.com/nypl-spacetime/field-of-view#api. In addition, I will add that fromFeature also accepts its own output (so you can feed an output field-of-view GeometryCollection back into fromFeature).

And I will add options to the getFieldOfView function, so you can specify which kind of field-of-view feature you want returned: one point, two points, GeometryCollection. All of those features will include angle, bearing and distance properties, so you can convert between them.

I am storing the GeometryCollection with one Point (camera position) and one two-point LineString (field-of-view line).