Skip to Content

UI5 Development: Visualization Object Spot

The spot VO is used to mark locations. The image of the spot can be specified inside the application. A spot is identified using the following class id:

CLSID

{00100000-2012-0004-B001-64592B8DB964}

Attribute

Binding

Type 

H/N 

DefaultDescription
type

No

string

Yes/Yes

must be the above CLSID

id

NostringYes/Yesspecifies the id of the VO

datasource

No

string

path to a data node

pos

Yes

vector

Yes/Yes

position where to place the spot

image

Yes

string

Yes/Yes

reference to the resource section

imageSelectedYesstringYes/No

reference to the resource section

iconYesstringNo/Yesicon specifier
textYesstringNo/Yes

text on the spot
tooltipYesstringYes/Yestooltip of the spot
scaleYesvectorYes/Yes0;0;0x,y,z scaling, only x and y are used
hotScaleYesvectorYes/Yes1;1;1x,y,z only x and y are used
hotDeltaColorYesstringNo/Yesrelative or absolute color value
fxdirNobooleanNo/Yesthe VO does not rotate
fxsizeNobooleanNo/Yesthe  VO keeps  its size
DragSourceNoobjectNo/Yesdrag filter information
DropSourceNoobjectNo/Yesdrop filter information



Remarks

The size of the spot image can be chosen by an image designer. Nevertheless the image should be as small as possible to get a high rendering performance and to save memory consumption. 

There are quite some limitations on the spot. The spot VO has some implicit layout which can’t be changed from within the application.

The figure shows the layout of a spot when a text as an image is applied. A specified scaling is applied to all the above dimensions. It is important that the anchor point is always centered at the bottom.

When we don’t use the text and icon property, you can design a spot image that seems not to be symmetric z y axis as shown in the next figure.

This is done by setting all the pixels on the left side to be transparent.


{

       "id": "Spot",

       "type": "{00100000-2012-0004-B001-64592B8DB964}",

       "datasource": "Spots",

       "pos.bind": "Spots.GeoPosition",

       "scale": "1.0;1.0;1.0",

       "fxdir": "true",

       "fxsize": "true",

       "image": "flag.png",

       "tooltip.bind": "Spots.ToolTip",

    }

 

Here a spot is defined. The given id is used whenever events are triggered from the VO. In the sample, the datasource references a table in the data section. For each row in that  table a spot will be displayed. The position for the spots is bound to the GeoPosition column of the table. The Spot is not stretched due the given x,y,z scale factors for the spot are set to 1. With the parameters fxdir and fxsize we express that all spots should keep their orientation and size. These parameters are important in the native 3D implementation to have the spots visible even when the camera is far away from them and to prevent them to get invisible when the scene is rotated.

The image is configured for all instances of the spots to the same flag.png while the tooltip is bound to a table column.

Tags:
Former Member

No comments