I've got a marker on a map (v.3).
I then bring up the default panorama (.getStreetView()), using marker.getPosition() for panorama.setPosition().
I then have to manually rotate the street view to find my marker. This is the step I want to avoid.
But I can't seem to be able to calculate the heading value for setPov().
I've tried
computeAngle() function from
this example, but it doesn't seem to help, as in the example the coordinates of the panorama POV and the marker are indeed different, but in my case, they are "same," so the function always returns
0.
I'm putting quotes arond "same" because on the actual display they are not. A panorama POV is always in the middle of the road, whereas a marker, even created with the same LatLng, is always on the side of the road, against an actual building. So the marker is visible at certain heading, and not visible otherwise.
How can I calculate that heading?