View type ? or Camera type ? What about Animation type ?
A camera-driven explorer. Right. But what does it do ?
A multi-building view ? What good is it if I only have 1 building ?
As we recently worked on the multi-floor routes (see this blog post), we became aware that all those concepts, though they do empower developers to shape their map experience ever more precisely, might be confusing to the newcomers.
So this post aims at clarifying the main concepts that you will have to master when integrating VisioWeb into your application.
Hope this helps !
There are 3 different paradigms in VisioWeb for displaying complex venues with one or more buildings, each featuring one or more floors. The view type is initialized as a parameter passed to Mapviewer#setupMultiBuildingView.
- multibuilding – floors are tightly stacked upon each other from the ground level to the currently selected one.
- multifloor – in building mode, floors are all displayed in a vertical carousel, there is a substantial gap between them. In floor mode, the outside is hidden.
The list is interactive and allows the user to choose the current floor. By default, the only interactions possible are scrolling up or down the list and selecting the current floor by tapping the center of the screen. From VisioWeb 1.9.6, developers will be able to override this and enable zoom, rotation, pitch and even click on interactive places (instead of the floor selection).
The gap can be configured from VisioMapEditor, floor per floor. From VisioWeb 1.9.6, it is possible to override stackGap values when calling Mapviewer#setupMultiBuildingView.
- singlefloor – floors are displayed one at a time.
When the user changes the current floor, the previous one is animated away (see Animation type, below) and replaced by the new one.
- global – the viewpoint encompasses the whole venue, allowing the user to choose one building to start exploring.
- building – only enabled in multifloor view type, all floors of the current building are displayed as a list (this mode is disabled by default in multibuilding, irrelevant in singlefloor).
- floor – one floor is selected, the corresponding building is “opened” and the user can explore, modify the viewpoint, interact with places.
There are 2 kinds of animation available when showing/hiding some floors typically when calling MultiBuildingView#goTo. The animation type is initialized as a parameter passed to Mapviewer#setupMultiBuildingView.
- translation – the floor is sent away upwards or downwards or it is coming from far up or far down.
- opacity – the floor disappears by becoming transparent or appears by becoming opaque.
- both – both animation types are combined together.
There are 2 different kinds of camera to display the 3D scene. The camera type is initialized as a parameter passed to Mapviewer#initialize.
- perspective – the 3D scene is displayed as the human eye would see it. This projection provides a depth information to the viewer: objects that are farther are smaller on the screen than closer ones. This projection is typically used for wayfinding use cases.
- orthographic – the 3D scene is projected on the screen without giving any depth information, the distances and sizes are preserved. This projection is typically used when using the map as a support for monitoring other layers of geographic data. The singlefloor view type is more suited for this camera type.
The CameraDrivenExplorer class is responsible for guessing when users are interested in a particular building of the venue. It triggers the selection of a building when…
- the user zooms towards it
- the user is already viewing the map close enough and pans over it
The MultiBuildingView class is responsible for handling all the scene and camera animations that make your maps so alive and interactive.
It earned its name because it was introduced to support multi-building venues at a time when all these interactions were impossible or very difficult to achieve.
But don’t be afraid, using MultiBuildingView isn’t dedicated to multi-building venues : you can benefit of its features even if your dealing with only one building.
If we missed something here, if another concept needs an explanation/illustration please tell us on the Q&A forum.
The VisioWeb team.