You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, April 13th 2018, 6:03am

What is proper way to update the content/xml of pano view?

Hi all,

I developing a web that users are able to move the hotspot to wherever they like, I have a stupid plan that is js invoke function in xml, forloop all hotspots and get their updated position and then jscall() send back whole string to js side and call server to export a new XML to overwrite the old one.

Is that any more efficient way to archive this goal?

Thanks for advance.

2

Friday, April 13th 2018, 8:25am

hm.. maybe better (?) :
save the positions per user in a cookie
and set them dynamically (without xml)

3

Friday, April 13th 2018, 9:52am

I would like to save those data in server and retrieve the setup(hotspot, fov...etc) when they come back, so I think to save as XML file is a good idea to store those data, am I looking at right direction?

Tuur

Sage

Posts: 3,347

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

4

Friday, April 13th 2018, 12:55pm

Hi,

i would read-write from txt file with php.
Simple and fast.

or, maybe.. not sure, using local access can do the job. (string)

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Apr 13th 2018, 1:35pm)


5

Friday, April 13th 2018, 4:46pm

I would like to save those data in server and retrieve the setup(hotspot, fov...etc) when they come back, so I think to save as XML file is a good idea to store those data, am I looking at right direction?


depends... if you want all users to have the same hotspots, then you do it on the server
if you want every user to have his own positions, then you do it locally/client-side
if you want every user to have his own positions and do it on the server, you need cookies anyway

i think rewriting the xml is too complicated...
you'd have to handle requests from different users with session ids etc
to just save all hotspots positions in an array and save this as a cookie is cleaner and easier to code i think.
just save the cookie on each change and onstart you check the cookie and setup the hotspots

Tuur

Sage

Posts: 3,347

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

6

Saturday, April 14th 2018, 12:40pm

Good one!
Didn’t think about that.

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

7

Monday, April 16th 2018, 7:08am

It's a great idea!
I think the most complicate part is I have to update the data each whenever user drag the hotspot.

Thanks for your help

8

Sunday, May 13th 2018, 11:44am

by the way ... take care you'll end up in prison for using cookies after the 28.5...
https://gdpr-info.eu

*wacko*

Tuur

Sage

Posts: 3,347

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

9

Sunday, May 13th 2018, 11:59am

I hear a lot of that thing yes. But i completely don’t understand.
..
So, cookies with just some <image content info are problematic? That would be stupid.
I searched a bit to understand this new law... not a chance.
I think about just to ignore it as i do no customer or client data stuff online.

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

10

Sunday, May 13th 2018, 5:25pm

it was more a joke, but actually i m not so sure what is really allowed and what not.
i just read that this law might be used by malicious laywers
to sue people/companies for not regarding customer privacy.

This post has been edited 2 times, last edit by "indexofrefraction" (May 13th 2018, 5:41pm)