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

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: 980

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • 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 online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

3

Sunday, April 26th 2020, 3:00pm

spacerywirtualne-san.

Thank you!

It worked fine. *smile*