This article shows how to add a visualization control to your application using the Ubisense .NET API.

You should know the information in the following articles:
Before you start, remember to:
Add the Ubisense references to your application
To add a map component to your application you will actually be adding what
Ubisense calls a visualization component. The component does not exist under
your toolbox because you will need to add it. Right click on the Toolbox and
choose 'Choose Items'. You will then need to browse to the
UbisenseVisualization.dll found in
C:\Program Files\Ubisense 2.1\bin.
Once selected, you will then be able to add the component to the Toolbox.

Now it is as simple as dragging the component onto your form. At this point there are many things you can do with the map component but we will just highlight a few basics.

The Model property of
the visualization should be set to an instance of a
MapModel.
|
The visualization will view the area loaded in the
model. The
MapModel class has two
overloaded methods. We can load an area by giving this method a
Ubisense.UBuilding.Area instance or the name of the area we want to load.
|
The visualization control displays the area that is loaded into the model.
We could iterate over the contents of a building schema to find a suitable area to load. The following code loads the first area found:
|
Note: You must handle the possible cases where the area has changed its name or there is not an area to load.
At this point you should switch off the "LoaderLock" managed debug assistant if you
want to run a visualization in Visual Studio debug mode. This is a user option that is
defined in a file that is not provided in the example source code. Click on "Debug > Exceptions",
expand the "Managed Debug Assistants" list and un-check "LoaderLock".
When you run the
example, the visualization control should now display the loaded area.
View - by default the view is in 2D but pressing 3 puts the map in 3D, pressing 2 will put the map back into 2D
Zoom + Page Up and Page Down, or hold the right mouse button and mouse movement
Drag + Directional keys or the hold the left mouse button and mouse movement.
Free Rotation in 3D + Shift + Left mouse button and mouse movement