Click here to Skip to main content
12,450,977 members (25,573 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript HTML
i am getting an error like this

Invalid value for property <heading>: undefined

Here is my code,

var loc = new google.maps.LatLng(window.parent.streetViewLat, window.parent.streetViewLon);

var panoramaOptions = {
position: loc,
pov: {
heading: window.parent.heading,
pitch: 0,
zoom: 1
}

Thanks in Advance.
Posted 18-Jan-13 11:04am
lisalis197
Comments
Sergey Alexandrovich Kryukov 18-Jan-13 17:12pm
   
Again and again: why wouldn't you just take a look at documentation?
—SA

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Look at this: window.parent.heading. First, a window may or may not have a parent. If not, the value of window.parent will be undefined. But the main thing is: this object does not have the property "heading". Want to check it? Please see:
http://www.w3schools.com/jsref/obj_window.asp[^].

—SA
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100