on 01-07-2015 4:54 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.