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.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

1

Wednesday, September 19th 2012, 10:17pm

Size of BingMaps

How do I change the size of the BingMaps. It seems that the width responds OK and I can also align it but I can not change the height.
It does not matter if I set it in % or in pixels. It always go to around 90 %. Actually the default setting from the tools is 50% which does not make sense as it fills the full container.

I asume I need to just ignore this container and place it without it.

Hans

2

Friday, September 21st 2012, 6:21pm

Hi,

in the default vtourskin.xml the height of the bingmaps is calucalted dynamically in the 'skin_onresize' action:

Source code

1
2
3
4
5
6
7
<action name="skin_onresize">
  mul(mh, stageheight, -1);
  if(layer[skin_thumbs].state == 'visible', add(mh,layer[skin_thumbs].height); );
  if(layer[skin_map].state == 'visible', sub(hh,stageheight,20); sub(hh,layer[skin_control_bar].height); sub(hh,32); copy(layer[skin_map].height, hh); add(mh,hh); );
  set(layer[skin_scroll_layer].y, get(mh));
  ifnot(ismobile, if(stagewidth LT 480, skin_showbuttons(false), skin_showbuttons(true)); );
</action> 


this is the relevant part for the bing map:

Source code

1
2
3
4
sub(hh,stageheight,20);
sub(hh,layer[skin_control_bar].height);
sub(hh,32);
copy(layer[skin_map].height, hh); 


there the final size of the map is calculated:
  1. first the 20px from the bottom 'border/control distance' will be subtracted from the total screen/pano height
  2. then the height of the control bar be subtracted
  3. and finally 32px space for the title-text

best regards,
Klaus