@@ -14,6 +14,6 @@ Specifies the URL of a JSON configuration file. | |||||
## Other parameters | ## Other parameters | ||||
A subset of the JSON configuration file options can be used as URL parameters. | A subset of the JSON configuration file options can be used as URL parameters. | ||||
These include `author`, `title`, `hfov`, `pitch`, `yaw`, `haov`, `vaov`, | |||||
`vOffset`, `autoLoad`, `autoRotate`, `firstScene`, `ignoreGPanoXMP`, and | |||||
`fallback`. | |||||
These include `panorama`, `config`, `author`, `title`, `hfov`, `pitch`, `yaw`, | |||||
`haov`, `vaov`, `vOffset`, `autoLoad`, `autoRotate`, `firstScene`, | |||||
`ignoreGPanoXMP`, `preview`, and `fallback`. |
@@ -5,6 +5,6 @@ | |||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<iframe width="480" height="390" allowfullscreen style="border-style:none;" src="../src/standalone/pannellum.htm?tour=../../examples/example-tour.json"></iframe> | |||||
<iframe width="480" height="390" allowfullscreen style="border-style:none;" src="../src/standalone/pannellum.htm?config=../../examples/example-tour.json"></iframe> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -21,14 +21,20 @@ function parseURLParameters() { | |||||
json += '"' + option + '":'; | json += '"' + option + '":'; | ||||
switch(option) { | switch(option) { | ||||
case 'hfov': case 'pitch': case 'yaw': case 'haov': case 'vaov': | case 'hfov': case 'pitch': case 'yaw': case 'haov': case 'vaov': | ||||
case 'vOffset': | |||||
case 'vOffset': case 'autoRotate': | |||||
json += value; | json += value; | ||||
break; | break; | ||||
case 'autoLoad': case 'ignoreGPanoXMP': | case 'autoLoad': case 'ignoreGPanoXMP': | ||||
json += JSON.parse(value); | json += JSON.parse(value); | ||||
break; | break; | ||||
default: | |||||
case 'tour': | |||||
console.log('The `tour` parameter is deprecated and will be removed. Use the `config` parameter instead.') | |||||
case 'author': case 'title': case 'firstScene': case 'fallback': | |||||
case 'preview': case 'panorama': case 'config': | |||||
json += '"' + decodeURIComponent(value) + '"'; | json += '"' + decodeURIComponent(value) + '"'; | ||||
break; | |||||
default: | |||||
anError('An invalid configuration parameter was specified: ' + option); | |||||
} | } | ||||
if (i < URL.length - 1) { | if (i < URL.length - 1) { | ||||
json += ','; | json += ','; | ||||