You are not logged in.

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

1

Saturday, November 12th 2016, 12:15am

hotspots in seperate file

Hi All,

Is it possible to have hotspots in a different file than where your scenes are located? My goal is to generate the hotspots serverside, but leave the tour.xml intact from the droplet.

Source code

1
2
3
4
5
6
7
8
9
10
<!-- tour.xml -->
<include url="all_hotspots.xml" />

<scene name="test">
...
</scene>

<scene name="test2">
...
</scene>


I tried adding a parent="test" or parent="scene[test]" to the hotspot, Anyone got other ideas. I would be nice if I wouldnt resort to addhotspot onxmlcomplete or something, because I'm not sure if thats the most efficient way (parsing xml nodes on load seems to me, being more efficient, but maybe Im wrong)

Thanks

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

2

Saturday, November 12th 2016, 9:11am

Hi Zephyr,

Generating them on the fly works perfect.
Onnewscene and with some smart naming of the hotspots, i had the hotspot coordinates and destination from excel.
A smart action with some for loop should be enough.
I had no performance issues on desktop or mobiles.
Works perfect!

Hope it helps
Tuur *thumbsup*

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 1,003

Location: Netherlands

Occupation: Web developer

  • Send private message

3

Saturday, November 12th 2016, 1:04pm

Thanks Arthur, I was afraid it would be slower than regular xml parsing.

What would be faster/more performant you think?

Javascript krpano.call('addhotspot(stuff)") or through krpano actions?

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

4

Saturday, November 12th 2016, 1:21pm

mmm.. i am not sure about that..
I also think it depends on how many hotspots you will have in the current scene if it makes a real difference.

i will make a small example in just xml.

Tuur *thumbsup*

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

jordi

Professional

Posts: 583

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

6

Monday, November 14th 2016, 1:53pm

Try with Javascript actions directly in XML
everpano.com step beyond 360