Is it possible to retrieve the GPS coordinates of the magnification pane in Google's Street View? The magnification pane is typically represented by a semi-transparent rectangle or oval that moves around the street view as you move your mouse. Unfortunately, after reviewing the API documentation, it seems like binding to a mouse move event to get the position of the pane may not be feasible.
You can obtain the latitude and longitude coordinates from the panorama by adding a listener for the 'position_changed' event:
google.maps.event.addListener(panorama, 'position_changed', function() {
console.log('position', panorama.getPosition());
});
Additionally, you can extract heading and pitch information by listening to the 'pov_changed' event:
google.maps.event.addListener(panorama, 'pov_changed', function() {
console.log('pov', panorama.getPov());
});
This implementation utilizes Google Maps Javascript API V3.
If you inspect the generated source code of the panorama and examine the SVG object, you will notice two elements that are updated when the mouse is moved. An Ellipse element represents the panel on the road:
<ellipse fill="white" fill-rule="evenodd" visibility="hidden" fill-opacity="0.5" cx="658" cy="223" rx="30" ry="5"></ellipse>
There is also a Path element representing the panel on buildings or walls:
<path fill="white" fill-rule="evenodd" visibility="hidden" fill-opacity="0.5" d="M400 53 L402 -22 L299 -65 L296 24 Z"></path>
While you could potentially determine the dimensions of the pane using this information, it remains unclear whether you can derive the position of the pane relative to the user's current position.