You are not logged in.

Peter360

Beginner

  • "Peter360" started this thread

Posts: 9

Location: Kent

Occupation: Attempting to do panos (and make a living!)

  • Send private message

1

Tuesday, June 10th 2014, 10:48am

Selecting different floorplans (as layers) by using combobox dropdown

Hi there
I'm guessing this is a bit of a stupid question...but...hey ho...

I want to from a drop down list make the tour display different floorplans (which are set as layers with navigation layers in them) so really just trying to work out what should replace the "onclick="loadscene(scene_Set01_Panorama);" code to make a layer e.g. "groundfloor" visible and the other layers (floors) in same location (on screen) not visible.

I'm guessing this is a pretty standard approach?

Thanks in anticipation
Peter

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

2

Tuesday, June 10th 2014, 9:28pm

Hard to say withhout the code but I can try:
- In your scene you have attribute onstart. There you can place actions you want to be triggered at scene start e.g.

Source code

1
2
3
4
5
6
7
8
9
<scene name="scene_first" title="first" onstart="set(layer[groundflor_1].visible,true);set(layer[groundflor_2].visible,false);set(layer[groundflor_3].visible,false);" thumburl="panos/first.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="110" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
		<preview url="panos/first.tiles/preview.jpg" />
		<image type="CUBE" multires="true" tilesize="512" progressive="false">
			.
			.
			.
		</image>

Peter360

Beginner

  • "Peter360" started this thread

Posts: 9

Location: Kent

Occupation: Attempting to do panos (and make a living!)

  • Send private message

3

Tuesday, June 10th 2014, 10:26pm

Thanks Umalo
I understand I have not made my question v.clear...
this is the typeof thing I am trying to achieve...
http://www.vpix.net/index.php?tour=102855
however this involves using the combobox plug in and creating some form of onclick command that says (as in your advice I think) set a particular layer to "visible". So if there are 4 layers (=floors) then one of them could eacjh be selected from the drop down list. I just thought this would be a fairly normal requirement.
I have been tried loading some additional xml code by ten selected although I guess this is a clumsy way of achieving what I want?
BUT I DON'T BELIEVE THIS IS THE RIGHT WAY

e.g.
<plugin name="floor" url="plugins/combobox.swf" alturl="plugins/combobox.js"
align="rightbottom" x="1%" y="63%" width="15%" height="4%" visible="true" keep="true" alpha="1" rowcount="10" >
<item name="ground" caption="Ground" onclick="loadpano(floor.xml, null, MERGE, BLEND(2));" />
<item name="lower" caption="Lower Ground" onclick="loadpano(lower.xml, null, MERGE, BLEND(2));" />
<item name="first" caption="First Floor" onclick="loadpano(first.xml, null ,MERGE, BLEND(2));" />
<item name="second" caption="2nd Floor" onclick="loadpano(second.xml, null, MERGE, BLEND(2));" />
...
</plugin>

As you will see I don't really understand xml at all... I'm a photographer!!

Any guidance really appreciated!
Peter

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

4

Tuesday, June 10th 2014, 11:13pm

aha now I get it.
Well if we are talking about the left screen side box than it is not loading any new scene but just tween appropriate layer from "outside"
In general: those are 4 layers with map and mappoints. all positioned outside and when item from box selected you call action that will hide them all and position them all outside and than tween one of them to right position.
Can be done in many ways and should be no more than couple of lines of code.
You see also bug in this tour where what ever floor you select it always show some mappoint as active with radar. You would most probably like to see only radar on the floor where current active scene is beloning?
Do you already have your layers with maps and mappoints created. If not you have in examples code for simple usage. Online version here:
http://krpano.com/examples/117/examples/…h-imagemap.html

Peter360

Beginner

  • "Peter360" started this thread

Posts: 9

Location: Kent

Occupation: Attempting to do panos (and make a living!)

  • Send private message

5

Tuesday, June 10th 2014, 11:30pm

I see Umalo
My actual idea was a simple drop down within the visible(normal pano) area but if they could be dragged from outside even better.. so what I would find useful is the link (onclick) code between selecting an item from the list and dispalying one of those images with hotspots (I reckon I can sort those out ok; although I've avoided radar as a bit too complex for me) I'm actually quite happy to find someone I can turn to in this area as I say I ain't no programmer....

Peter360

Beginner

  • "Peter360" started this thread

Posts: 9

Location: Kent

Occupation: Attempting to do panos (and make a living!)

  • Send private message

6

Wednesday, June 11th 2014, 10:43am

Do you already have your layers with maps and mappoints created. If not you have in examples code for simple usage.
Hi Umalo
With your guidance I have now put it all in one xml file...

If you take a look at www.360vista.net/floor2.php then you will see where I am ...what I believe I need to do is change the x axis for the four floorplans to send them out of screen to right and then have an onclick action that moves the respective one to the right position by changing the value again....but how do I do this?

The current code for the correct combobox is;
<plugin name="floor" url="plugins/combobox.swf" alturl="plugins/combobox.js" align="rightbottom" x="1%" y="63%" width="15%" height="4%" visible="true" keep="true" alpha="1" rowcount="10" >
<item name="ground" caption="Ground" onclick="loadxml();" />
<item name="lower" caption="Lower Ground" onclick="loadxml();" />
<item name="first" caption="First Floor" onclick="loadxml();" />
<item name="second" caption="Second Floor" onclick="loadxml();" />
...
</plugin>





The layers are like this: with layer name "ground", "lower", "first", "second"...

<layer name="ground" url="grndfloor.jpg" keep="true" align="rightbottom" x="5%" y="12%" width="15%" height="50%"
visible="true"
handcursor="true"
scalechildren="false"
maskchildren="true"
onclick="closemap();"
zorder="2"
>

The idea of tweening is good and would look much nicer and I think I can suss it out if I can get to the next stage?

Thanks
Peter

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

7

Monday, June 16th 2014, 10:13pm

Now you have tweening and right floor open depending on what scene is loaded.
Think about what if you have portrait orientation of the screen? Your percentage based sizing with both attributes width and height in % is not good idea. At least make one % second PROP. Test it to see what I'm talking about. Resize your browser and observe. Same for dropdown lists definition.