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

Friday, December 15th 2017, 9:41am

Google Maps zoom in scene

Hi,

ist es möglich, das zoom-Attribut für das Google Maps-Plugin in der tour.xml in "scene"-zu verwenden. Das man die Zookstufe in der vtourskin.xml für das skin global einstellen kann weiß ich. Ich möchte aber für jede scene eine andere Zoomstufe verwenden.

MfG

2

Tuesday, January 2nd 2018, 1:22pm

Niemand eine Idee?

toosten

Intermediate

Posts: 446

Location: Berlin

Occupation: freier Software-Entwickler ( HTML, JS, PHP, JSP, Flash, AS3, C++, Java, krpano, ---)

  • Send private message

3

Tuesday, January 2nd 2018, 2:22pm

https://krpano.com/docu/xml/#events.onnewscene
copy( plugin[map].zoom, scene[get(xml.scene)].map_zoom );

<scene name="beispiel" map_zoom="3" >
...

4

Wednesday, January 3rd 2018, 1:17pm

Wo muss der "copy"-Aufruf denn genau hin?

5

Wednesday, January 3rd 2018, 1:22pm

Momentan sieht steht das in meiner vtourskin.xml

Source code

1
onmapzoomed="if(zoom LT 5, set(zoom, 5)); if(zoom GT 19, set(zoom, 19));"


Damit kann ich gleich noch den minimalen und maximalen Zoom begrenzen. Die funktioniert aber nicht in der tour.xml im scene-Aufruf.

toosten

Intermediate

Posts: 446

Location: Berlin

Occupation: freier Software-Entwickler ( HTML, JS, PHP, JSP, Flash, AS3, C++, Java, krpano, ---)

  • Send private message

6

Wednesday, January 3rd 2018, 2:57pm

Wo muss der "copy"-Aufruf denn genau hin?

<events onnewscene="copy( plugin[map].zoom, scene[get(xml.scene)].map_zoom );" />

7

Wednesday, January 3rd 2018, 3:04pm

<events onnewscene="copy( plugin[map].zoom, scene[get(xml.scene)].map_zoom );" />

Hatte ich bereits probiert, funktioniert leider nicht.

toosten

Intermediate

Posts: 446

Location: Berlin

Occupation: freier Software-Entwickler ( HTML, JS, PHP, JSP, Flash, AS3, C++, Java, krpano, ---)

  • Send private message

8

Wednesday, January 3rd 2018, 3:21pm

Bei mir gehts! Dieses Beispiel mit der XMl unten.

https://krpano.com/plugins/googlemaps/#examples

<krpano onstart="loadscene(beispiel)">

<events onnewscene="copy( plugin[map].zoom, scene[get(xml.scene)].map_zoom );" />

<scene name="beispiel" map_zoom="10" >

<!-- pano image -->
<preview url="preview.jpg" />
<image>
<cube url="pano_%s.jpg" />
</image>

</scene>

<!-- container layer -->
<layer name="mapcontainer" type="container" bgcolor="0xFFFFFF" bgalpha="0.5" align="leftbottom" x="5" y="5" width="270" height="370" keep="1">

<!-- maps plugin - use Google for HTML5 and Bing for Flash -->
<plugin name="map" keep="true"
url.html5="%SWFPATH%/plugins/googlemaps.js"
url.flash="%SWFPATH%/plugins/bingmaps.swf"
key.html5=""
key.flash=""
maptype="SATELLITE"
lat="41.898761" lng="12.473094" zoom="18"
align="lefttop" x="10" y="10" width="250" height="350"
>

<radar visible="true" size="300" alpha="0.33" fillcolor="0xFFFFFF" fillalpha="1.0" linecolor="0x00FF00" linealpha="0.5" linewidth="0.5" dragable="true" headingoffset="0" />

<spot name="spot1" lat="41.898761" lng="12.473094" heading="0" active="true" />

</plugin>

</layer>

</krpano>

9

Wednesday, January 3rd 2018, 3:34pm

hmm, ich weiß nicht ob wir vom Gleichen sprechen. Ich möchte in einer Tour für jede scene einen eigenen Zoom der Google Maps Karte aufrufen. Das Maps-Plugin, wie in Deinem Beispiel, rufe ich in meiner xml gar nicht auf.

Hier mal meine xml

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<krpano version="1.19" title="">

	<include url="skin/vtourskin.xml" />

	<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
	<skin_settings maps="true"
	           	maps_type="google"
	           	maps_bing_api_key=""
	           	maps_google_api_key=""
	           	maps_zoombuttons="false"
	           	gyro="true"
	           	webvr="true"
	           	webvr_gyro_keeplookingdirection="false"
	           	webvr_prev_next_hotspots="true"
	           	littleplanetintro="false"
	           	title="true"
	           	thumbs="false"
	           	thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
	           	thumbs_opened="false"
	           	thumbs_text="false"
	           	thumbs_dragging="true"
	           	thumbs_onhoverscrolling="false"
	           	thumbs_scrollbuttons="false"
	           	thumbs_scrollindicator="false"
	           	thumbs_loop="false"
	           	tooltips_buttons="false"
	           	tooltips_thumbs="false"
	           	tooltips_hotspots="false"
	           	tooltips_mapspots="false"
	           	deeplinking="false"
	           	loadscene_flags="MERGE"
	           	loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
	           	loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
	           	loadscene_blend_next="SLIDEBLEND(0.5,   0, 0.75, linear)"
	           	loadingtext="loading..."
	           	layout_width="100%"
	           	layout_maxwidth="814"
	           	controlbar_width="-24"
	           	controlbar_height="40"
	           	controlbar_offset="20"
	           	controlbar_offset_closed="-40"
	           	controlbar_overlap.no-fractionalscaling="10"
	           	controlbar_overlap.fractionalscaling="0"
	           	design_skin_images="vtourskin.png"
	           	design_bgcolor="0x2D3E50"
	           	design_bgalpha="0.8"
	           	design_bgborder="0"
	           	design_bgroundedge="1"
	           	design_bgshadow="0 4 10 0x000000 0.3"
	           	design_thumbborder_bgborder="3 0xFFFFFF 1.0"
	           	design_thumbborder_padding="2"
	           	design_thumbborder_bgroundedge="0"
	           	design_text_css="color:#FFFFFF; font-family:Arial;"
	           	design_text_shadow="1"
	           	/>

	<!--
		For an alternative skin design either change the <skin_settings> values 
		from above or optionally include one of the predefined designs from below.
	-->
	<!-- <include url="skin/vtourskin_design_flat_light.xml"  /> -->
	<!-- <include url="skin/vtourskin_design_glass.xml"   	/> -->
	<!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
	<!-- <include url="skin/vtourskin_design_117.xml"     	/> -->
	<!-- <include url="skin/vtourskin_design_117round.xml"	/> -->
	<!-- <include url="skin/vtourskin_design_black.xml"   	/> -->


	<!-- startup action - load the first scene -->
	<action name="startup" autorun="onstart">
		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
		loadscene(get(startscene), null, MERGE);
		if(startactions !== null, startactions() );
	</action>
	
	<events onnewscene="copy(plugin[map].zoom, scene[get(xml.scene)].map_zoom);"
	/>


	
	<scene name="scene_Pano-Final_sphere" title="Beispiel" onstart="" thumburl="panos/Pano-Final_sphere.tiles/thumb.jpg" lat="35.689694" lng="139.692863" heading="-100" map_zoom="12">

		<view hlookat="0.7" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="1.3" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/Pano-Final_sphere.tiles/preview.jpg" />

		<image>
			<cube url="panos/Pano-Final_sphere.tiles/pano_%s.jpg" />
		</image>

	</scene>


</krpano>

toosten

Intermediate

Posts: 446

Location: Berlin

Occupation: freier Software-Entwickler ( HTML, JS, PHP, JSP, Flash, AS3, C++, Java, krpano, ---)

  • Send private message

10

Wednesday, January 3rd 2018, 3:48pm

Ich kann ja nicht wissen wie du die map einbindest! Deshalb ist ein Beispiel oder ein Link zu Tour sehr hilfreich und lößt Probleme viel einfacher!

<events onnewscene="copy(plugin[skin_map].zoom, scene[get(xml.scene)].map_zoom);" />

11

Wednesday, January 3rd 2018, 3:58pm

Vielen Dank, jetzt funktioniert es. *smile*

12

Thursday, January 11th 2018, 1:48pm

Hallo toosten,

ich habe Änderungen in der vtour.xml gemacht, aber die wirken sich nicht auf den Eingangs-Zoomfaktor aus. Kannst Du sagen, was ich machen kann, damit die Karte so wie im zweiten Beispiel aussieht?


Hier die erste Version meiner Tour:

pano.szenerien.de/Museum_in_Gnutz/krpano/vtour/tour.html

So wird die Karte geöffnet:



Und so sollte sie aussehen:




Aus der vtourskin.xml:

Source code

1
2
3
4
5
6
7
<layer name="skin_map" state="closed" url="" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="0" lng="0" zoom="17" bgalpha="0" maptype="hybrid" onmapready="skin_addmapspots();">
							<maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" scale.mobile="1.5" />
							<radar visible="false" headingoffset="0" />
							<spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
							<layer name="skin_map_zoom_in"  style="skin_base" visible="get:skin_settings.maps_zoombuttons" crop="9|512|46|64"  align="right" x="0" y="-40" zorder="2" ondown="layer[skin_map].zoomin();  skin_buttonglow(get(name));" onup="skin_buttonglow(null);" />
							<layer name="skin_map_zoom_out" style="skin_base" visible="get:skin_settings.maps_zoombuttons" crop="73|512|46|64" align="right" x="0" y="+40" zorder="2" ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" />
						</layer>

toosten

Intermediate

Posts: 446

Location: Berlin

Occupation: freier Software-Entwickler ( HTML, JS, PHP, JSP, Flash, AS3, C++, Java, krpano, ---)

  • Send private message

13

Thursday, January 11th 2018, 2:37pm

Wenn bei allen gleich: zoom="17" anpassen, musste probieren was dir gefällt.

14

Thursday, January 11th 2018, 11:45pm

Ich habe in der vtourskin.xml bereits verschiedene Werte dort eingetragen. Offenbar hatte das nur lokal keine Auswirkung. Vom Server aus klappt das. Alles gut!

toosten

Intermediate

Posts: 446

Location: Berlin

Occupation: freier Software-Entwickler ( HTML, JS, PHP, JSP, Flash, AS3, C++, Java, krpano, ---)

  • Send private message

15

Friday, January 12th 2018, 8:30am

Die mobilen Devices cachen besonders gerne, viel & lange! *g*