cancel
Showing results for 
Search instead for 
Did you mean: 

initialZoom?

Former Member
0 Kudos

Hi all,

I've noticed that a previous VB version handled initialZoom correctly, but the one in sapui5.hana.ondemand.com/sdk/test-resources does not: when I specify initialZoom: 0 and the map is bigger than say 600x400, it won't show up in the minimal zoom, it is still possible to zoom out manually. Is this a feature?

Cheers,

-- Micha

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello Micha,

actually it is a feature, even though I have to explain a bit more in detail why we changed the behaviour to the current one.

You might have noticed that we changed the zooming behaviour in most cases in a way that we that we zoom from integer LODs (level of details) to the next integer zoom level (with an animation in between). Before there were also non-integer LOD levels possible. On non-integer levels the display of all objects as well as the map is significantly worse as the canvas has to be stretched accordingly.

There are few exceptions to the above, one can be found on the mobile devices, the "two finger stretch" still zooms to the exact LOD level. Another is the minimal LOD, which can be always targeted as the user wants to be able to take a look on the complete world, even if the quality of the graphics might be a bit harmed. Minimal LOD is defined in a way that the world fits exactly into the div in x-direction.

Using initialZoom = 0 is a natural definition and it should open the map with kind of minimal LOD, so you should be able to see complete world. Now we had a complaint, that the initial impression of the map (especially contained areas and geomaps) is bad, while it improves with further zoom steps. Well, originally we had the initial zoom directly on the minimal LOD. As an example for 800x400 it would be something around 1.6439. The next bigger integer LOD level is not too far away, so initial zoom will be set to this (in our case 2) with far better graphics quality, even though user is still able to zoom out as you described.

If this distance exceeds 0.6 this mechanism is not used and the map opens with the exact minimal LOD. This should be the case for your example 600x400 which opens with LOD 1.229 (with suboptimal display quality).


To avoid all these problems we recommend to use multiples of 256 for div width and height in case a fixed size is used.

Best Regards, Juergen

Former Member
0 Kudos

That explains it all, thanks a lot.

-- Micha

ralf_rath
Explorer
0 Kudos

Hi ,

I published a document from Jürgen

it explains also additional parameters.

Answers (0)