Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Freitag, 1. Januar 2010, 16:20

Show/hide googlemaps button

Hello,

Is it possible to make one button to show or hide Google Maps?

Happy New Year to all of you :)

2

Samstag, 2. Januar 2010, 13:07

Hi,

yes,

e.g. when the googlemaps is included as:

Quellcode

1
<plugin name="maps" url="googlemaps.swf" .... >


then the googlemaps can be hidden, when calling
from the an other button - set(plugin[maps].visible, false);

e.g.

Quellcode

1
<plugin name="hidemapsbutton" .... onclick="set(plugin[maps].visible, false);" ... />


best regards,
Klaus

3

Montag, 27. September 2010, 23:28

Hi Klaus,
I'm enjoying working with your Krpano Googlemaps example but don't quite follow what you wrote. How do I integrate your code. I thought this might work but doesn't. What am I doing wrong:

<!-- google map -->
<plugin name="map"
url="%SWFPATH%/plugins/googlemaps.swf"
keep="true"
blendmode="layer"
align="leftbottom"
x="0"
y="0"
width="400"
height="400"
visible="true"
key="ABQIAAAA2c--4Vth66ePXVcVzlhLyBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQser8zYS3pHFBZtNof1k5XKvSUmw"

lat="34.060028"
lng="-118.297037"
zoom="17"
maptype="SATELLITE"

dragging="true"
scrollwheel="true"
continuouszoom="false"

onmapready="load_theatre();"
>

<plugin name="hidemapsbutton"
onclick="set(plugin[maps].visible, false);" />

4

Freitag, 1. Oktober 2010, 13:28

Hi,

this code:

Quellcode

1
<plugin name="hidemapsbutton" .... onclick="set(plugin[maps].visible, false);" ... />
was just an partial example,
the '....' means there must be the normal stuff to display an image,

e.g. here an complete plugin definition that shows and aligns an image: (you need a 'hidebutton.png' image for this example)

Quellcode

1
2
3
4
5
6
7
8
<plugin name="hidemapsbutton" 
   	url="hidebutton.png"
   	align="leftbottom"
   	x="10"
   	y="10"
   	zorder="99"
   	onclick="set(plugin[maps].visible, false);"
   	/>


best regards,
Klaus

5

Dienstag, 5. Oktober 2010, 20:23

Thanks again Klaus. I have added the code but the button only appears for a second and then disappears. It seems to vanish as the map is loaded. I hope it does not seem I am asking you to do my work but I just can't figure this part out. Best regards

<krpano version="1.0.8">

<textstyle name="DEFAULT" font="Arial" fontsize="14" bold="true"
textcolor="0"
background="false" backgroundcolor="16777215" border="false" bordercolor="0"
alpha="1" blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
origin="cursor" edge="bottom" textalign="center" xoffset="0" yoffset="-3" showtime="0.1"
/>

<plugin name="hidemapsbutton"
url="button.png"
align="rightbottom"
x="10"
y="10"
zorder="99"
onclick="set(plugin[map].visible, false);"
/>

<!-- google map -->
<plugin name="map"
url="%SWFPATH%/plugins/googlemaps.swf"
keep="true"
blendmode="layer"
align="leftbottom"
x="0"
y="0"
width="400"
height="400"
visible="true"
key="ABQIAAAAGV-v11JkyzhAuERGGDlA5xRj_5T5M95T4UPhtTr6qrBX1SL12RSGm22fqjX4r5RhT0EJXYRCYetWBA"

lat="34.060028"
lng="-118.297037"
zoom="17"
maptype="SATELLITE"

dragging="true"
scrollwheel="true"
continuouszoom="false"

onmapready="load_theatre();"
>



<radar visible="true" size="300" alpha="0.33" fillcolor="0xFFFFFF" fillalpha="1.0"
linecolor="0xFFFFFF" linealpha="0.0" linewidth="0.0"
glow="true" glowcolor="0" glowwidth="4" glowstrength="3"
behindspots="true" dragable="true"
/>

<zoomcontrol visible="true" anchor="topleft" x="2" y="2" hasscrolltrack="false" />

6

Mittwoch, 2. März 2011, 20:50

google Maps kills all Hotspots ?!?

Hi @ all;

short: The problem ist if i load the gmaps plugin everything other will be disabled. If i write in the blue marked parts i lost anything else. This is the xml of the mainpage:

<krpano version="1.0.8" logkey="false" onstart="action(onstart);" >

<include url="skin/multiframeskin.xml" />
<include url="allpanos.xml" />-->
<include url="hlookat.xml" />
<include url="hotspot.xml" />
<include url="autorotate.xml" />
<include url="buttons.xml" />
<include url="display.xml" />
<include url="kontext.xml" />
<include url="hotspot2.xml" />
<include url="progress.xml" />
<!-- <include url="helpscreen.xml" />-->
<!-- <include url="introimage.xml" />-->
<include url="googlemaps.xml" />



<scene name="scene1" onstart="action(startscene);">

<action name="startscene">
plugin[maps].pantospot(scene1);
plugin[maps].activatespot(scene1);
</action>


<view fov="40" fovmin="20" fovmax="90" />

<image type="CUBE" multires="true" tilesize="567" progressive="false" frames="2" frame="1">
<level tiledimagewidth="3119" tiledimageheight="3119">
<left url="regie_1.tiles/%f/l5/l_%0v_%0h.jpg" />
<front url="regie_1.tiles/%f/l5/f_%0v_%0h.jpg" />
<right url="regie_1.tiles/%f/l5/r_%0v_%0h.jpg" />
<back url="regie_1.tiles/%f/l5/b_%0v_%0h.jpg" />
<up url="regie_1.tiles/%f/l5/u_%0v_%0h.jpg" />
<down url="regie_1.tiles/%f/l5/d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="1560" tiledimageheight="1560">
<left url="regie_1.tiles/%f/l4/l_%0v_%0h.jpg" />
<front url="regie_1.tiles/%f/l4/f_%0v_%0h.jpg" />
<right url="regie_1.tiles/%f/l4/r_%0v_%0h.jpg" />
<back url="regie_1.tiles/%f/l4/b_%0v_%0h.jpg" />
<up url="regie_1.tiles/%f/l4/u_%0v_%0h.jpg" />
<down url="regie_1.tiles/%f/l4/d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="780" tiledimageheight="780">
<left url="regie_1.tiles/%f/l3/l_%0v_%0h.jpg" />
<front url="regie_1.tiles/%f/l3/f_%0v_%0h.jpg" />
<right url="regie_1.tiles/%f/l3/r_%0v_%0h.jpg" />
<back url="regie_1.tiles/%f/l3/b_%0v_%0h.jpg" />
<up url="regie_1.tiles/%f/l3/u_%0v_%0h.jpg" />
<down url="regie_1.tiles/%f/l3/d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="390" tiledimageheight="390">
<left url="regie_1.tiles/%f/l2/l_%0v_%0h.jpg" />
<front url="regie_1.tiles/%f/l2/f_%0v_%0h.jpg" />
<right url="regie_1.tiles/%f/l2/r_%0v_%0h.jpg" />
<back url="regie_1.tiles/%f/l2/b_%0v_%0h.jpg" />
<up url="regie_1.tiles/%f/l2/u_%0v_%0h.jpg" />
<down url="regie_1.tiles/%f/l2/d_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="195" tiledimageheight="195" aspreview="true">
<left url="regie_1.tiles/%f/l1/l_%0v_%0h.jpg" />
<front url="regie_1.tiles/%f/l1/f_%0v_%0h.jpg" />
<right url="regie_1.tiles/%f/l1/r_%0v_%0h.jpg" />
<back url="regie_1.tiles/%f/l1/b_%0v_%0h.jpg" />
<up url="regie_1.tiles/%f/l1/u_%0v_%0h.jpg" />
<down url="regie_1.tiles/%f/l1/d_%0v_%0h.jpg" />
</level>
</image>

</scene>

</krpano>



and this is the googlemaps.xml:

<!-- start - wait until the map is ready, then load first scene -->
<action name="onstart">
set(plugin[maps].onmapready, loadscene(scene1, null, MERGE) );
</action>


<!-- global buttons to load the scenes (keep="true") -->
<plugin name="load1" url="%SWFPATH%/plugins/textfield.swf" children="false" keep="true"
css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF" visible="false" onover="tween(alpha,0.7,distance(0.3,0.2));" onout="tween(alpha,1.0,distance(0.3,0.2));" onloaded="set(alpha,0);set(textblur,15);set(blur,15); set(visible,true); tween(alpha,1,0.3); tween(textblur,0,0.3); tween(blur,0,0.3);"
html="[p]load scene 1[/p]"
align="bottom" x="-150" y="55" width="120" height="22"
onclick="loadscene(scene1, null, MERGE, BLEND(1));"
/>

<!-- Wenn es einen Schalter gibt -->
<plugin name="info" style="button" x="+200" crop="600|0|40|40" onovercrop="600|40|40|40" ondowncrop="600|80|40|40" onhover="showtext(google Maps ,buttonstyle);" onclick="displayGmaps();" visible="true" onover="tween(alpha,1);" onout="tween(alpha,0.2);" />

<action name="displayGmaps">
set(plugin[maps].alpha,0);
set(plugin[maps].blur,15);
set(plugin[maps].visible,true);
set(plugin[maps].enabled,true);
tween(plugin[maps].alpha,1,0.3);
tween(plugin[maps].blur,1,0.3);
set(plugin[info].onclick,closeGmaps();)
</action>

<action name="closeGmaps">
set(plugin[maps].enabled,false);
tween(plugin[maps].alpha,0,0.3,null,set(plugin[maps].visible,false));
tween(plugin[maps].blur,20,0.3);
set(plugin[info].onclick,displayGmaps();)
</action>



<!-- global google map -->
<plugin name="maps" url="%SWFPATH%/plugins/googlemaps.swf" handcursor="false" keep="true"
align="center"
x="0"
y="0"
width="400"
height="300"

key="ABQIAAAAf5nLiL8oHKbDoOzxKW7LXBShVT3WnwtlJsc0nrFWmVte3bQgwRSXgeJS8RFGKEDOxE8cjf37NocU2w"

lat="52.339018"
lng="14.531533"
zoom="16"

maptype="satellite"
maptypes="satellite|physical"

dragging="true"
scrollwheel="true"
continuouszoom="false"
keyboard="false"
crosshairs="false"

onmapready=""
onmapmoved=""
onmapzoomed=""
onmaptypechanged="if(maptype == physical, if(zoom GT 15,setzoom(15)); , if(zoom GT 18,setzoom(18)); );"

blendmode="layer"

onloaded="set(alpha,0);delayedcall(2,tween(alpha,1));delayedcall(6,ifnot(hovering,tween(alpha,0.1)));"
onover="tween(alpha,1);"
onout="tween(alpha,0.2,0.3);"
>

<radar visible="true"
size="200"
alpha="0.33"
fillcolor="0xFFFFFF"
fillalpha="1.0"
linecolor="0xFFFFFF"
linealpha="0.0"
linewidth="0.0"
glow="true"
glowcolor="0"
glowwidth="4"
glowstrength="3"
behindspots="true"
dragable="true"
/>

<positioncontrol visible="true" anchor="topleft" x="2" y="2" />
<maptypecontrol visible="true" anchor="leftbottom" x="2" y="40" buttonalign="v" />
<zoomcontrol visible="true" anchor="topright" x="2" y="2" hasscrolltrack="true" />

<!-- spots -->

<spot name="scene1" lat="52.339018" lng="14.531533" heading="68"
onhover="showtext(scene1);"
onclick="loadscene(scene1, null, MERGE, BLEND(1));"
/>

</plugin>
Don't be irritate because of the strange things obove. I try to call and close the Map from a button but i leave the normal call inside.

What i do is i call the scene1 and if i do this all the Hotspots etc. are gone.

What did i wrong.

If Klaus read this maybe he can answer in german?!?


LG Andy
Andreas Schaefer

panoconcept.de

Ähnliche Themen