You are not logged in.

datofz

Beginner

  • "datofz" started this thread

Posts: 19

Location: Lyon, France

  • Send private message

1

Friday, November 23rd 2018, 2:47am

caller addspot onclik !

Hello,

Sorry if this question have be alredy posted, i see nothing like my case.
I make my own xml for bing map. map is the layer caller.


I dont see what this return "null" for onclick action in caller.addspot (i dont use the vtouskin.xml)
for me onclick="loadscene(get(scene[get(i)].name))" ? no ?


Source code

1
2
3
4
5
6
7
8
<action name="addMapSpots" scope="local">
for(set(i,0), i LT scene.count, inc(i),
if(scene[get(i)].lat,
showlog();
trace ('my scene title = ', 'get(scene[get(i)].title)'); // return good
trace ('my scene name = ','get(scene[get(i)].name)'); // return very good
caller.addspot(get(scene[get(i)].title), get(scene[get(i)].lat), get(scene[get(i)].lng), null, true, loadscene(get(scene[get(i)].name)), null);
</action>

Thanks a lot
Damien

spacerywirtualne

Professional

Posts: 955

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

2

Friday, November 23rd 2018, 10:50am

Hi

You have not closed the for and if function.


Source code

1
2
3
4
5
6
7
8
9
10
<action name="addMapSpots" scope="local">
 for(set(i,0), i LT scene.count, inc(i),
  if(scene[get(i)].lat,
  showlog();
  trace ('my scene title = ', 'get(scene[get(i)].title)'); // return good
  trace ('my scene name = ','get(scene[get(i)].name)'); // return very good
  caller.addspot(get(scene[get(i)].title), get(scene[get(i)].lat), get(scene[get(i)].lng), null, true, loadscene(get(scene[get(i)].name)), null);
  );
 );
</action>

p.s. Your "addMapSpots" action is called on "onmapready"?

regards
piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

datofz

Beginner

  • "datofz" started this thread

Posts: 19

Location: Lyon, France

  • Send private message

3

Friday, November 23rd 2018, 11:04am

Good Morning Piotr
I think i close the for and the if at the line 8 and 9 no ? except the ; not neccesseary line 8...

Yes il lauch it from onmapready.

datofz

Beginner

  • "datofz" started this thread

Posts: 19

Location: Lyon, France

  • Send private message

4

Sunday, November 25th 2018, 1:13am

I find.
we must do like this before the caller.addspot:
calc(spotclickevent, 'activatespot(' + spotname + '); delayedcall(0.5,loadscene(' + scene[get(i)].name + ', null, MERGE, BLEND(1)));');
and
caller.addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotclickevent) );
Good night