You are not logged in.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

1

Monday, September 17th 2012, 6:39pm

Layer endtags

I do not understand this layer tags.

After the Bingmaps I have 4 layer endtags. Thats against everything I learned.
As far as I can see I have 7 layers before these 4 endtags.

It does not make sense at all for me.

Hans

2

Wednesday, September 19th 2012, 4:24pm

Hi,

an xml element can be always defined either this way:

Source code

1
<element attributes ... />


or this way:

Source code

1
2
<element attributes ...>
</element>


technically they are equal, but when an element should have other 'sub/child-elements', then the second case is required,
e.g.

Source code

1
2
3
<element attributes ...>
  <childelement attributes />
</element>


Best regards,
Klaus

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

3

Wednesday, September 19th 2012, 8:32pm

Maybe it makes it understandable for you but that is all volapyk for me when I look at this
ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />

</layer>
</layer>
</layer>
</layer>

They do not even correspond to the number of <layer tags

Hans
and if I remove just one of them I get an error.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

4

Wednesday, September 19th 2012, 9:58pm

I can see that what appears to be childs do not have any parent attribute.
Instead it seems to have several endtags.

I am not a coder but I usually am able to understand the codes using common sense. This does not make common sense to me.

Hans

5

Friday, September 21st 2012, 6:10pm

Hi,

in the tour.xml, the layer xml elements with 'children' elements/nodes were defined this way:

Source code

1
2
3
<layer ...>
   ...
</layer> 

there the element starts with '<layer ...>' and ends with '</layer>'

but the layer xml element without any children elements were defined this way:

Source code

1
<layer ... />

there the element starts with '<layer' and ends with '/>'

so each element is closed of course, there are no additional or too much closing elements,

best regards,
Klaus

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

6

Friday, September 21st 2012, 7:03pm

Sorry thats even more volapyk to me.

Here is your code from the skin.

<!-- Skin Layout -->

<layer name="skin_scroll_window" type="container" keep="true" align="leftbottom" width="100%" height="100%" x="0" y="60" y_shown="60" y_hidden="-2" maskchildren="true">
<layer name="skin_scroll_layer" type="container" align="leftbottom" width="100%" height="100%" x="0" y="-100%">
<layer name="skin_topborder" url="vtourskin.png" crop="2|0|60|12" align="topleft" edge="bottomleft" width="100%" height="12" x="0" y="0" enabled="false" />
<layer name="skin_title" url="%SWFPATH%/plugins/textfield.swf" align="lefttop" edge="leftbottom" width="95%" height="32" autoheight="true" x="5" y="-3" zorder="4" enabled="false" background="false" border="false" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:16px;" textshadow="1" visible="false" />

Here ends the first containerset with 3 layers in. I would assume and I also read what you say that it should have an endtag here, but there is nothing.


<layer name="skin_scroll_container" type="container" bgcolor="0x000000" bgalpha="0.5" align="lefttop" width="100%" height="100%" x="0" y="0" maskchildren="true">
<layer name="skin_thumbs" state="hidden" url="%SWFPATH%/plugins/scrollarea.swf" alturl="%SWFPATH%/plugins/scrollarea.js" direction="h" visible="false" align="top" width="100%" height="100" onloaded="skin_updatescroll();" />
<layer name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();"> <maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" />
<spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />

<layer name="skin_map_androidzoom_in" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
<layer name="skin_map_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
</layer>
</layer>
</layer>
</layer>

Instead the next containerset for the thumbs and the map ends with 4 layer endtags
As there are no parent tags I assume that everything between the first layer with maskchildren=true and the endtag are children.


Hans

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

7

Friday, September 21st 2012, 7:29pm

It makes sense if you have indention. If its "> the next tag is a child.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<layer name="skin_scroll_window" type="container" keep="true" align="leftbottom" width="100%" height="100%" x="0" y="60" y_shown="60" y_hidden="-2" maskchildren="true">
	<layer name="skin_scroll_layer" type="container" align="leftbottom" width="100%" height="100%" x="0" y="-100%">
		<layer name="skin_topborder" url="vtourskin.png" crop="2|0|60|12" align="topleft" edge="bottomleft" width="100%" height="12" x="0" y="0" enabled="false" />
		<layer name="skin_title" url="%SWFPATH%/plugins/textfield.swf" align="lefttop" edge="leftbottom" width="95%" height="32" autoheight="true" x="5" y="-3" zorder="4" enabled="false" background="false" border="false" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:16px;" textshadow="1" visible="false" />
		<layer name="skin_scroll_container" type="container" bgcolor="0x000000" bgalpha="0.5" align="lefttop" width="100%" height="100%" x="0" y="0" maskchildren="true">
			<layer name="skin_thumbs" state="hidden" url="%SWFPATH%/plugins/scrollarea.swf" alturl="%SWFPATH%/plugins/scrollarea.js" direction="h" visible="false" align="top" width="100%" height="100" onloaded="skin_updatescroll();" />
			<layer name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">
				<maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" />
				<spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
				<layer name="skin_map_androidzoom_in" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
				<layer name="skin_map_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
			</layer>
		</layer>
	</layer>
</layer>
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

8

Saturday, September 22nd 2012, 12:02pm

Sorry Sacha but now you are talking in riddles. Indention means space,

.......may be used for what looks like a space in front of this line.

What does that have to do with the 4 layer endtags which seems to have no real reference to anything above them.

I can see now that if I count the numbers without end tag above them it make sense but it is confusing as you have a mix of layers with and without endtags.
As far as I understand it is layers within layers which is not a good way I think.

I can see that it makes sence in some of the layers later in the skin.

Its the same as what I said about the container for maps and thumbs are mixed together instead of making them separate. It is very confusing and makes it difficult to edit them. Also the idea with children that have no parent tag is confusing.

When you are doing codes for Photographers of which 90% have no idea of what is going on in the xml you have to do things much simpler.
As someone said on the Facebook Panoramic Photographers . Coders has ha different brain then most of us photographers have. They can do great things with coding but have very difficult to see how difficult it is for most of us to understand it.

Hans

This post has been edited 4 times, last edit by "HansNyb" (Sep 22nd 2012, 12:39pm)


HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

9

Saturday, September 22nd 2012, 12:23pm

Another thing I found in the skin.- Klaus uses a <Krpano> </krpano> division within the xml that actually starts and ends with <krpano

I did not know you could do this.
I guess this is the same as making 2 xml and using include.

Hans

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

10

Saturday, September 22nd 2012, 3:50pm

The indention is to show it more clearly. When it is "> it is not closed and is still open. All following tags are the children.

Source code

1
2
3
4
5
6
			<layer name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">
				<maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" />				
<spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
				<layer name="skin_map_androidzoom_in" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
				<layer name="skin_map_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
			</layer>


==

Source code

1
2
3
4
5
<plugin name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">
<maptypecontrol parent="skin_map" visible="true" align="righttop" x="5" y="5" buttonalign="v" />
<spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
<plugin name="skin_map_androidzoom_in" parent="skin_map" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />
<plugin name="skin_map_androidzoom_out" parent="skin_map" url="vtourskin.png" effect="glow(0,0.5);" 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);" devices="Android+Tablet+Flash" />




Sorry Sacha but now you are talking in riddles. Indention means space,

.......may be used for what looks like a space in front of this line.

What does that have to do with the 4 layer endtags which seems to have no real reference to anything above them.

I can see now that if I count the numbers without end tag above them it make sense but it is confusing as you have a mix of layers with and without endtags.
As far as I understand it is layers within layers which is not a good way I think.

I can see that it makes sence in some of the layers later in the skin.

Its the same as what I said about the container for maps and thumbs are mixed together instead of making them separate. It is very confusing and makes it difficult to edit them. Also the idea with children that have no parent tag is confusing.

When you are doing codes for Photographers of which 90% have no idea of what is going on in the xml you have to do things much simpler.
As someone said on the Facebook Panoramic Photographers . Coders has ha different brain then most of us photographers have. They can do great things with coding but have very difficult to see how difficult it is for most of us to understand it.

Hans
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

11

Saturday, September 22nd 2012, 4:54pm

Hi,

I have tried here to visualize the start and end points from each xml element:



Quoted

Another thing I found in the skin.- Klaus uses a <Krpano> </krpano> division within the xml that actually starts and ends with <krpano>
That's more a 'trick', <krpano> xml elements were ignored when mapping the xml structure to the working data structure.
e.g. the following xml structure:

Source code

1
2
3
4
5
6
7
<krpano xyz="123">
  <abc xyz="123" />
  <krpano fgh="123" />
  <stuff>
    <node name="n1" val="123" />
  </stuff>
</krpano>


will be mapped to:

Source code

1
2
3
4
xyz=123
abc.xyz=123
fgh=123
stuff.node[n1].val=123


In the default vtourskin.xml these <krpano> elements plus the devices setting there, were used to make these xml parts only be appearing on specific devices.

Best regards,
Klaus