Sie sind nicht angemeldet.

1

Montag, 13. Juni 2022, 14:21

Using popup example as an image map

Hi,


I have a regular tour with 35 scenes and use the popup example to open a VTour/map. The map is just a scene loaded into the popup window and is a multi tile flat pano with hotspots on. All looks great and the hotspots are linked to all the other scenes but I’m not quite sure how to set it so that when I click on the hotspot, the linked scene is loaded in the main tour window and not inside the popup. I guess the pop up would close and just show the linked scene in the main viewer.

All I’ve done is duplicated the regular skin_hotspotstyle and created skin_mapspotstyle so one of the hotspots would look like this


<hotspot name="spot1" style="skin_mapspotstyle" ath="0.238" atv="0.389" distorted="false" zoom="false" linkedscene="scene_footballfield" />


and here's the edited skin and actions


Quellcode

1
2
3
			<!-- skin_mapspotstyle - style for the Map hotspots -->	<style name="skin_mapspotstyle" url="vtourskin_maphotspot.png" edge="top" distorted="true"	       tooltip=""	       linkedscene=""	       linkedscene_lookat=""	       onclick="skin_mapspotstyle_click();"	       depth="1000"		   alpha="1"	       scale="0.6"	       onover.addevent=""	       onout.addevent=""	       onloaded.addevent="skin_mapspotstyle_setup();"	       />
	<action name="skin_mapspotstyle_setup" scope="local">		if(isvalue(caller.linkedscene) AND skin_settings.tooltips_hotspots,			copy(caller.tooltip, scene[get(caller.linkedscene)].title);			caller.loadstyle(skin_tooltips);		);	</action>
	<action name="skin_mapspotstyle_click" scope="local">		if(isvalue(caller.linkedscene),			copy(hs_linkedscene, caller.linkedscene);			if(caller.linkedscene_lookat, txtsplit(caller.linkedscene_lookat, ',', hs_lookat_h, hs_lookat_v, hs_lookat_fov); );			set(caller.enabled, false);			skin_hidetooltips();				skin_loadscene(get(hs_linkedscene), get(skin_settings.loadscene_blend));				if(hs_lookat_h !== null, skin_lookat(get(hs_lookat_h), get(hs_lookat_v), get(hs_lookat_fov)); );				skin_updatescroll();			);		);	</action>





Any help is greatly appreciated.

Thanks,

Andrew

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »andrew22222« (17. Juni 2022, 07:24)


2

Sonntag, 19. Juni 2022, 01:47

I've studied the code wine cellar code as that uses a map with radar but unfortunately that doesn't work correctly on a mobile device and there's no zoom in or drag feature which is why I wanted to use the multires panorama of a floor plan and have mapspots on that.

3

Dienstag, 21. Juni 2022, 12:47

Gave up and went with the Demotour Corfu as I didn't realise it had a drag option so you can use a large graphic as the floor plan / map. No zoom in but you can't have everything ;-)


It was taking ages to try and work out the % locations of the map points especially as I had 38 of them so just in case anyone out there goes the same route and you have Affinity Photo installed ......


Load the graphic into AP, make sure the Guides are displayed (View – Show Guides) and also the Info Panel is open (View – Studio- Info) and that the percent box is checked.

Now when you drag the guides, where they meet you record the Horizontal % and the Vertical % figures. Note that it get’s you really close but you still may have to add .05 or whatever you need to get it exact.



<layer name="mapspot4" style="mapspot" x="73.8%" y="84%" linkedscene="main_entrance" />




You can probably do something similar in other software also.

Cheers,



Andrew