Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm building a virtual tour application that uses Google's streetview code to render the panoramas into a non-distorted view. Each panorama has 1 to n links where the user can select to move on.

I use the GPS coordinates of each location to calculate the compass bearing from the current location to the next. The issue has to do with StreetView's rendering of the link bearings.

When a panorama loads, one of the data fields required is centerHeading. This determines the part of the image that is rendered smack dab in the middle of whatever element you're using as a map container.

In addition, whatever value centerHeading has is what StreetView sees as due north. The link rendering locations are displayed relative to north, which causes quite a bit of inaccuracy with the link bearings.

Check out [http://130.111.148.131/JMCTour/testIndex.php][1] for an example. The bearing from the start location to the next is 247 degrees, as calculated from the GPS coordinates of each location. Due to the way the image was taken, the centerHeading value is 175 degrees, and this throws off the actual links quite a bit. In order to have a correct link bearing, I have to manually replace the calculated bearing of 247 degrees with 0.

Multiply this trial and error bearing testing by over 100 seemingly arbitrary heading definitions, and you just might get a headache. So my question is, is there a way to factor in the location's heading setting in the link bearing calculations?

share|improve this question
    
its not clear from the app link. But I think your GPS coordinates are in lat/lon EPSG:4326 projection and google uses a different projection called Google Mercator. EPSG:900913 –  rashad Nov 19 '12 at 4:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.