It is like the hotspot image is glued on pano. You hold click and move to navigate the pano. If you try to do that clicking on the hotspot area you are not allowed to move.
capture="false" does the trick.
Posts by alfabeta
-
-
No.
That moves the hotspot. I want the hotspot fixed in its position and move the pano with the hotspot. Same as if you click-drag anywhere outside the hotspot image.krpano.com - Examples
Hold click and drag anywhere the pano moves but if you hold click on a hotspot -
Hi Tuur, thanks for your help.
It seems I wasn't clear.
I want to allow users to move the pano (and the anchored hotspot, of course) when they hold click the hotspot image and move to any desired point or direction.That is not possible if they click on a hotspot and drag(move).
Default hotspot cursor is pointer but I have changed to default to look the same as outside the hotspot.
Thanks -
Hi,
How to be able to move the pano from some point of the area where a hotspot is placed. It is an image hotspot.
Thank you
-
-
-
I've include the map style into the action.
I tried all your suggestions but nothing changes: the map is loaded at the correct coords but radar and spot are absent.
See that radar doesn't use any of the arguments and it isn't displayed.Code
Display More<action name="map_action" scope="local" args="latitude, longitude, heading"> addlayer('mapcontainer'); set(layer['mapcontainer'].type, container); layer['mapcontainer'].loadstyle(mapcontainer); addlayer('map'); set(layer[map].parent, 'mapcontainer'); //layer[map].loadstyle('map'); set(layer[map], lat=get(latitude), lng=get(longitude), keep="true", url="%VIEWER%/plugins/googlemaps.js", key="AIza...", maptype="SATELLITE", zoom="18", align="lefttop", x="10", y="10", width="-20", height="-20"); set(layer[map].radar, visible=true, size='350', alpha='0.33', fillcolor='0xFFF000', fillalpha='1.0', linecolor='0x00FF00', linealpha='0.5', linewidth='0.5', dragable=true, headingoffset=0); layer[map].addspot('P1', get(latitude), get(longitude), get(heading), active); layer[map].panto( get(latitude), get(longitude)); </action> <scene ... onstart="map_action(40,30,-50);">
-
Testing, if in the action I replace the 3 arguments by some values like
set(layer[map].lat, latitude); by set(layer[map].lat, 35);
the map is displayed but radar and spot, only the map.
-
Thanks Piotr. That was a typo there not in the script.
-
Any help, please?
-
Some changes here, create both layers with the action
Code
Display More<style name="mapcontainer" type="container" bgcolor="0xFFFFFF" bgalpha="0.5" align="leftbottom" x="5" y="100" width.normal="300" height.normal="400" width.mobile="200" height.mobile="250" visible="true" />
Code
Display More<style name="map" keep="true" url="%VIEWER%/plugins/googlemaps.js" key="AIza..." maptype="SATELLITE" zoom="18" align="lefttop" x="10" y="10" width="-20" height="-20" />
Code
Display More<action name="map_action" scope="local" args="latitude, longitude, heading"> addlayer(mapcontainer); set(layer[mapcontainer].type, container); layer[mapcontainer].loadstyle(mapcontainer); addlayer(map); set(layer[map].parent, mapcontainer); layer[map].loadstyle(map); set(layer[map].lat, latitude); set(layer[map].lng, longitude); set(layer[map].radar.visible, true); set(layer[map].radar.size, 350); set(layer[map].radar.alpha, 0.33); set(layer[map].radar.fillcolor, 0xFFF000); set(layer[map].radar.fillalpha,1.0); set(layer[map].radar.linecolor, 0x00FF00); set(layer[map].radar.linealpha, 0.5); set(layer[map].radar.linewidth,0.5); set(layer[map].radar.dragable,true); set(layer[map].radar.headingoffset,0); layer[map].addspot(P1, latitude, longitude, heading, active); layer[map].setcenter(latitude, longitude); </action>
Here both layers are displayed but the child map a white rectangle
-
-
<style name="s1" bgcolor="0xFFFFFF" bgalpha="0.5" align="leftbottom" x="5" y="85" width="270" height="370"/>
<style name="s2" width="100" height="100" bgcolor="0x228444" type="text" />In a scene this works okay:
I'm trying to do the same from an action: <scene ... onstart="ac1();" ... >
Code<action name="ac1" scope="local" > addlayer(s1); layer[s1].loadstyle(s1); set(layer[s1].type, container); addlayer(s2); layer[s2].parent = s1; layer[s2].loadstyle(s2); </action>
This only displays layer s1. What am I missing?
Thank you -
The complete hotspot based on Popup examples
Code<hotspot name="video3" style="infospot" html="View..." ath="185" atv="0" onloaded="circlepos(5,6);" onclick.mobile="popup('iframe', 'https://www.youtube.com/embed/wtql...oplay=1', 355,200 false);" onclick.normal="popup('iframe', 'https://www.youtube.com/embed/wtql...oplay=1', 710,400 false);" scale="0.6" zoom="false" distorted="false" />
or
Code<hotspot name="video3" style="infospot" html="View..." ath="185" atv="0" onloaded="circlepos(5,6);" onclick="popup('iframe', 'https://www.youtube.com/embed/wtql...oplay=1', calc(device.mobile ? 355 : 710), calc(device.mobile ? 200 : 400), false);" scale="0.6" zoom="false" distorted="false" />
Both output a black line.
Testing with 2 hotspots same as previous with changes
name="video1" device="!mobile"
onclick="popup('iframe', 'https://www.youtube.com/embed/wtql...play=1', 710, 400, false);"name="video2" device="mobile"
onclick="popup('iframe', 'https://www.youtube.com/embed/wtql...play=1', 355, 200, false);"they work okay.
-
I have a hotspot with this attribute
onclick="popup('iframe', 'https://www.youtube.com/embed/wtql..., A, B, false"
How can I simply set A and B according to user device?
I know I can create an action with conditional mobile or not or create 2 almost identical hotspots, one with devices="!mobile" and the other with devices="mobile".
-
Outside scenes I have these simplified code:
The first layer must be visible in all scenes but the first one 'first_scene'.
The second layer must be present in all scenes but in 'first_scene' it must change its position from x=70 to x=10.
At bottom the action that onstart in 'first_scene'.
I guess it is a keep and visible issue but I don't realize how to accomplish that. Thanks in advance.Code<layer name="logo0" type="image" url="logo0.png" align="topleft" x="10" y="5" selectable="false" html="" visible="true" keep="true" ... />
Code<layer name="some_text" url="%swfpath%/plugins/textfield.swf" keep="true" align="topleft" x="70" y="10" html="blah blah hello" ... />
-
for radar see here : https://krpano.com/plugins/radar
Is this the only way in an action, using the radar plugin?
I'm not using it. I'm adapting https://krpano.com/releases/1.21/examples/#googlemaps -
Thank you!
I had edited my last post but the last add was not included.
1) How to add a radar element <radar visible="true" size="350" alpha="0.33" fillcolor= ?
2) Also <spot name="point1" lat="...
3) <layer name="map" style="map"
lat="input 1"
lng="input 2"
....
->
set(layer['map'].'lat',%1);
set(layer['map'].'lng',%2); ? -
Good, thanks.
Starting
Code<action name="map_rads"> addlayer('mapcontainer'); set(layer['mapcontainer'].style,mapcontainer); addlayer(layer['mapcontainer'].'map'); set(layer['mapcontainer'].layer['map'].style,map);
or
Code<action name="map_rads"> addlayer('mapcontainer',mpc); set(mpc.style,mapcontainer); addlayer(mpc.'map', MP); set(MP.style,map);
Is that so?
How to check the 'output' of the action?
-
Having scenes like
Code<scene ... > <layer name="alfa" attr1 ... attr2...> <layer name="beta" attr3="%1" attr4="%2"> <layer name="%3" ...> </layer> </layer> </layer> </scene>
where %1, %2 and %3 vary.
I want to know how to group all layers in a 'function layers' containing layers code and simplify the code something likeThanks