Closed Bonkles closed 1 year ago
All righty- initial code inspection and pointers from @bhousel indicate that this functionality used to be in the setStyles function- example in the V2.1 code here:
There are similar setStyles
methods in the Streetside and Kartaview services too.
Now, to find out how they are fired/handled.
For Mapillary, here's how the v1 code worked:
sequenceDiagram
participant Photo Viewer
participant Mapillary Service
loop Repeat while dragging left mouse
Photo Viewer->>Mapillary Service: user drags pano photo
Mapillary Service->>onBearingChanged(): bearingChanged event w/ `bearing` in degrees
onBearingChanged()->>Mapillary Service: recalc rotation of pin w/CSS transform
end
For Bing streetside imagery the flow is very similar, but with an empty event called viewerChanged
which must be handled by calling back to the service to get the current yaw
and set the .css transform rotation with it.
In RapiD v1, selecting a 360 image pin and then using the photo viewer to 'pan' around dynamically adjusts the FOV marker on the map. Super slick. We should add this back in v2!