Hello
I would need to search between hotspots.
And after clicking, zoom on the hotspot
Can someone help me with this?
Well thank you
Hello
I would need to search between hotspots.
And after clicking, zoom on the hotspot
Can someone help me with this?
Well thank you
Searching among hotspots specifically in the current scene?
Searching among hotspots specifically in the current scene?
Yes yet
One scene I have 230 hotspots on the orthophoto map.
Second scene 3d model the same hotspots.
I made this up
https://gigapanorama.sk/3dcintorin/
<layer style="item" html="2,3 Strelec Mikulaš 25.4.1999[br]2,3 Sliacka Anna 23.5.1983" onclick="loadscene(scene_OrtofotoNEW, null, MERGE, BLEND(0.5));lookat(0.3535,0.0874,0.2605);" />
<layer style="item2" html="4,5 Sliacka Malvina 02.02.2022[br]4,5 Sliacky Emil 20.11.1993[br]4,5 Sliacka Zuzana 25.07.1970" onclick="loadscene(scene_OrtofotoNEW, null, MERGE, BLEND(0.5));lookat(0.3269,0.0870,0.2605);"/>
<layer style="item" html="6,7 Sliacky Jozef 18.12.1944[br]6,7 Sliacka Mária" onclick="loadscene(scene_OrtofotoNEW, null, MERGE, BLEND(0.5));lookat(0.3033,0.0886,0.2605);" />
<layer style="item2" html="8,9 Farbiaková Elena 31.3.1989[br]8,9 Frarbiak Juraj" onclick="loadscene(scene_OrtofotoNEW, null, MERGE, BLEND(0.5));lookat(0.2322,0.0978,0.2605);" />
<hotspot name="hs1"
style="letter" onclick="popup('image', '%CURRENTXML%/hroby/225.jpg');skin_showthumbs(false);poi();" ondown.touch="delayedcall(0.3, asyncloop(pressed, onhover() ); );"
onhover='showtext([font color="#FF0000"]225[/font][br]
Ľupták Pavel,STYLE6);'
>
<point ath="-0.15072709527578354" atv="-0.34930616661316244" />
<point ath="-0.13858613204683934" atv="-0.3482268577411937" />
<point ath="-0.1406445257230189" atv="-0.3229544906911802" />
<point ath="-0.15256902511237058" atv="-0.3240191508092809" />
</hotspot>
<hotspot name="hs2"
style="letter" onclick="popup('image', '%CURRENTXML%/hroby/223,224.jpg');skin_showthumbs(false);poi();" ondown.touch="delayedcall(0.3, asyncloop(pressed, onhover() ); );"
onhover='showtext([font color="#FF0000"]224-223[/font][br]
Ľupták Rudolf[br],STYLE6);'
>
<point ath="-0.134617895273891" atv="-0.34851267961008975" />
<point ath="-0.11111091505040349" atv="-0.3467426453577412" />
<point ath="-0.11323502544621533" atv="-0.32082880000119984" />
<point ath="-0.13660033444830333" atv="-0.3225280295229318" />
</hotspot>
There is a list of layers with a link and zoom to the hotspot.
There is no searching.
I will be grateful for any advice
I’m sure there are many options out there. But one option I used in the past was to have all hotspots database driven/created on the fly/on scene load. That was you can do/useform searches to your Krpano window.
Giving you and only showing the hotspots you need to see within a scene or on the map itself.
Plus with having a database you could also move to a specific hotspot no matter which scene or where it may be placed by passing its unique ID to your Krpano window.
Actually you can do the same, sort of, without database. I use it quite often, all hotspots not in the scenes and show the right ones on scene load.. this should make also a small search script reasonably simple.
Tuur
Actually you can do the same, sort of, without database. I use it quite often, all hotspots not in the scenes and show the right ones on scene load.. this should make also a small search script reasonably simple.
Tuur
I am a beginner in programming. I would need sample code
I’m sure there are many options out there. But one option I used in the past was to have all hotspots database driven/created on the fly/on scene load. That was you can do/useform searches to your Krpano window.
Giving you and only showing the hotspots you need to see within a scene or on the map itself.
Plus with having a database you could also move to a specific hotspot no matter which scene or where it may be placed by passing its unique ID to your Krpano window.
could you show me the sample code?
Write to me in a telegram, we will try to solve your problem: https://t.me/lastromantik
I use the Fuzzy Search plugin to search within 2000 "hotspots" (actually I don't really use hotspots but just raw positioning data but that does not really make a diffrence) in this image:
Plugin used:
krpano.com - Plugins - Fuzzy Search
Instead of auto-initialzing the scenes you have to use a function to feed the search plugin with all the hotspots and then use your list of hotspots to create a "zoom to" action for the seach results.
Display MoreI use the Fuzzy Search plugin to search within 2000 "hotspots" (actually I don't really use hotspots but just raw positioning data but that does not really make a diffrence) in this image:
Plugin used:
https://krpano.com/plugins/userplugins/fuzzysearch/
Instead of auto-initialzing the scenes you have to use a function to feed the search plugin with all the hotspots and then use your list of hotspots to create a "zoom to" action for the seach results.
thank you, I'll try it.
If I have a problem, I will write for advice on how you did it
name = 'anna'
krpano.layer.getArray()
.filter(i=>{
if(['item','item2'].indexOf(i.style)>=0){
if(i.html.toLowerCase().indexOf(name) == -1){
i.visible = false
i.alpha = 0
return false
}else{
i.visible = true
i.alpha = 1
return true
}
}
})
Display More
Javascript code to search for layers with item and item2 style. Hides/displays layers matching the query. It remains to screw this code to text input with onkeyup event )
Hi,
I made a most simple bare bone example to search for a hotspot.
Animals
https://www.virtualtuur.com/krpano/121/bar…mples/search/1/
https://www.virtualtuur.com/krpano/121/bar…arch/1/tour.xml
https://www.virtualtuur.com/krpano/121/bar…ch/1/search.xml
All hotspots in an array, click the hotspot to visit another scene.
Type a letter and it will show all hotspots with that letter, or type an animal.. i put 18 or so..
You can click the found animals and it will load the right scene and 'lookto' to the hotspot.
Hope it helps someone,
Tuur
Display MoreHi,
I made a most simple bare bone example to search for a hotspot.
Animals
https://www.virtualtuur.com/krpano/121/bar…mples/search/1/
https://www.virtualtuur.com/krpano/121/bar…arch/1/tour.xml
https://www.virtualtuur.com/krpano/121/bar…ch/1/search.xml
All hotspots in an array, click the hotspot to visit another scene.
Type a letter and it will show all hotspots with that letter, or type an animal.. i put 18 or so..
You can click the found animals and it will load the right scene and 'lookto' to the hotspot.
Hope it helps someone,
Tuur
I'm probably making a mistake somewhere
ERROR: dosearch - SyntaxError: Invalid or unexpected token [2x]
I quickly made a version 2
the search result is presented in alphabetical order, and some container and scrolling stuff..
https://www.virtualtuur.com/krpano/121/bar…mples/search/2/
https://www.virtualtuur.com/krpano/121/bar…arch/2/tour.xml
https://www.virtualtuur.com/krpano/121/bar…ch/2/search.xml
PANFOTO perhaps it is a good idea to make a super simple example set-up for your system/project to first make it work.
Tuur
I quickly made a version 2
the search result is presented in alphabetical order, and some container and scrolling stuff..
https://www.virtualtuur.com/krpano/121/bar…mples/search/2/
https://www.virtualtuur.com/krpano/121/bar…arch/2/tour.xml
https://www.virtualtuur.com/krpano/121/bar…ch/2/search.xml
PANFOTO perhaps it is a good idea to make a super simple example set-up for your system/project to first make it work.
Tuur
thank you for your time and advice
I'm going to try to implement it
I quickly made a version 2
the search result is presented in alphabetical order, and some container and scrolling stuff..
https://www.virtualtuur.com/krpano/121/bar…mples/search/2/
https://www.virtualtuur.com/krpano/121/bar…arch/2/tour.xml
https://www.virtualtuur.com/krpano/121/bar…ch/2/search.xml
PANFOTO perhaps it is a good idea to make a super simple example set-up for your system/project to first make it work.
Tuur
How can I apply the search to existing hotspots?
<hotspot name="hs1"
style="letter" onclick="popup('image', '%CURRENTXML%/hroby/225.jpg');skin_showthumbs(false);poi();" ondown.touch="delayedcall(0.3, asyncloop(pressed, onhover() ); );"
onhover='showtext([font color="#FF0000"]225[/font][br]
Ľupták Pavel,STYLE6);'>
<point ath="-0.15072709527578354" atv="-0.34930616661316244" />
<point ath="-0.13858613204683934" atv="-0.3482268577411937" />
<point ath="-0.1406445257230189" atv="-0.3229544906911802" />
<point ath="-0.15256902511237058" atv="-0.3240191508092809" />
</hotspot>
Hi,
before i'm gonna do a re-write and clean up/overhaul (later) i made 2 more versions.
With polygons:
https://www.virtualtuur.com/krpano/121/bar…mples/search/3/
With search selection:
https://www.virtualtuur.com/krpano/121/bar…mples/search/4/
Hope it helps,
Tuur
Hello
My problem is already solved.
Thanks for the help lastromantik
I share the code with his consent.
I used this example as the basis for the table
https://krpano.com/releases/1.21/…vefrictions.xml
Thank you to everyone involved in this forum Tuur s-maier VRW_Phil
Don’t have an account yet? Register yourself now and be a part of our community!