You are not logged in.

1

Sunday, April 26th 2020, 1:45pm

How to count specified hotspots?

There seems to be a way to TAG hotspots.

Can count all hotspots.
hotspot.count

Is it possible to count hotspots with only specified tags?

--- I am studying, but it does not move. --- *confused*
<action name="hs_tag_count_print"><![CDATA[
for(set(i,0), i LT hotspot.count, inc(i),
copy(hotspot_hide,if(hotspot[get(i)].tag == hide, hotspot.count);););

calc(plugin[hotspot_hide].html, 'hide:' + hotspot_hide +' );
]]></action>

I'm sorry, my English is not good.
thank you.

spacerywirtualne

Professional

Posts: 1,117

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

2

Sunday, April 26th 2020, 2:02pm

Hello, try this code:

Source code

1
2
3
4
5
6
7
8
9
	<action name="hs_tag_count_print">
		set(hs_tag_count,0);
		for(set(i,0), i LT hotspot.count, inc(i), 
		  if(hotspot[get(i)].tag == "hide",
		  	inc(hs_tag_count);
		  );
		);  
		calc(plugin[hotspot_hide].html, 'hide:' + hs_tag_count );
	</action>



Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Sunday, April 26th 2020, 3:00pm

spacerywirtualne-san.

Thank you!

It worked fine. *smile*