cancel
Showing results for 
Search instead for 
Did you mean: 

Tooltip for a Spot/Link in Visual Business

Former Member
0 Kudos

Hi Experts,

I have say 100 cars on a road.I am depicting cars as spots and road as a link.I s there any way i could hover mouse against each car and i could show a custom tooltip with the car id for each spot.

Thanks

Siju

Accepted Solutions (1)

Accepted Solutions (1)

former_member182119
Active Participant
0 Kudos

Hello Siju,

You can have individual tool tips on each spot by bind the tooltip attribute. You may refer to this page as an example: https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/ui/vbm/sapapi_tooltip.html. There app definitions are in

https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/ui/vbm/media/vbtooltip/main.json.

You find a VO "FLAG" in the SceneGeo. There the attribute tooltip in bound to data type Flags property ToolTip: "tooltip.bind": "Flags.ToolTip"

Unter DataTypes you find the type Flags, which assigns a alias "t" to property ToolTip:

{  "name": "ToolTip", "alias": "t", "type": "string" }

Under Data you find the data for the three spots:

"N": [ { "name": "Flags",  "E" : [

                     {  "p" : "0;0;0", "t" : "Spot1\r\nP(0;0;0)" },

                     {  "p" : "30;30;0", "t" : "Spot2\r\nP(30;30;0)" },

                     {  "p" : "30;0;0", "t" : "Spot3\r\nP(30;0;0)" }

  ] }

]

Remark: "\r\n" is the escaped format of carriage return line feed, to get the line break in the tooltip.

Best regards,

Uwe


Former Member
0 Kudos

Hii Uwe!

Thanks a bunch!

Can i have similar amswer from FPM point of view!

Regards

Siju

former_member182119
Active Participant
0 Kudos

Hello Siju,

on the backend it is also easy. When providing the data for a spot by filling structure IF_VBI_SERVICE_PROVIDER=>SPOT_ENTRY you just need to make an entry in nested table DESCRIPTION:

data: LS_DESCR_ENTRY type VBI_S_OBJECT_DESCR_ENTRY.

LS_DESCR_ENTRY-CATEGORY   = IF_VBI_CONST=>GC_DESCR_CATEGORY-TOOLTIP.
LS_DESCR_ENTRY-PART       = IF_VBI_CONST=>GC_DESCR_PART-BODY.
LS_DESCR_ENTRY-FIELD_NAME = 'Car ID'.
LS_DESCR_ENTRY-VALUE      = LV_CAR_ID.
append LS_DESCR_ENTRY to LS_SPOT-DESCRIPTION.

You may have a look into method ADD_SPOT of CL_VBI_GEOMAP_TEST_APPL as exsample.

Cheers,

Uwe

Former Member
0 Kudos

Hi Uwe,

That was straight forward.I appreciate yout reply.

Thanks a lot !

Cheers

Siju

Answers (0)