interactive-image-item
The interactive-image-item is used in the item property of the interactive-image component that servers as a container. The interactive-image-item can be set in various ways using the properties of the interactive-image as well as the properties described below.
Configuration options
Some properties are common to all components, see Common component properties for a list and their configuration options.
id
Provide an id for the item that is used for filtering and as a key
percentageCoordinates
Percentage x and y coordinates are required. Coordinates are represented as absolute percentage numbers between 0-100.
title
Give a name/title for the point, for example, Table 1.
color
This allows you to set a specific color for the active/selected point (e.g., when the point is selected or active).
icon
This allows you to set a specific icon for different states (e.g., when the point is selected active or inactive).
index
Index for the initial animation.
groupId
This property allows you to add the item to the group. The groups are created inside the component. Effective only initial load.
style
The following style options are available: isActive - shows if the point is active or available for selection. isDisabled - shows if the point is disabled and is unavailable for selection.
onPress
The action is triggered when pressing the image's marked coordinate point. Use IntelliSense (ctrl+space) to see the list of available actions.
Examples and code snippets
Restaurant table booking example


The example shows tables in a restaurant that are available for booking, the pointColor property is set to blue to show availabilty. Once a table is reserved the icon and color property are set to show that the tables are reserved and cannot be booked.
Examples: See the full example using static data in GitHub See the full example using dynamic data in GitHub
Datasource: See the full datasource for static data in GitHub See the full datasource for dynamic data in GitHub
children:
- type: component.interactive-image
options:
imageHeight: 1500
source:
uri: https://fpg.roomsketcher.com/image/level/164/3d/Elegant-Restaurant-Plan-3D.jpg
data: [email protected]
pointColor: color10
groups:
- title: Reserved Tables
id: Reserved
color: color14
item:
type: component.interactive-image-item
options:
id: [email protected]
title: [email protected]
icon: [email protected] = true ? 'close' :null
color: [email protected] = true ? 'color3' :null
style:
isDisabled: [email protected] = true ? true :false
percentageCoordinates:
x: [email protected]
y: [email protected]children:
- type: component.interactive-image
options:
imageHeight: 1500
source:
uri: https://fpg.roomsketcher.com/image/level/164/3d/Elegant-Restaurant-Plan-3D.jpg
data: [email protected]
pointColor: color10
groups:
- title: Reserved Tables
id: Reserved
color: color14
item:
type: component.interactive-image-item
options:
id: [email protected]
title: [email protected]
icon: [email protected] = 'TRUE' ? 'close' :null
color: [email protected] = 'TRUE' ? 'color3' :null
style:
isDisabled: [email protected] = 'TRUE' ? true :false
percentageCoordinates:
x: [email protected]
y: [email protected]datasources:
floorplan-restaurant-static:
type: datasource.static
options:
data:
- id: 1
name: Table 1
pax: 4
xCoordinate: 7
yCoordinate: 12
isReserved: true
- id: 2
name: Table 2
pax: 2
xCoordinate: 15
yCoordinate: 12
isReserved: true
- id: 3
name: Table 3
pax: 4
xCoordinate: 23
yCoordinate: 12
isReserved: false
- id: 4
name: Table 4
pax: 4
xCoordinate: 48
yCoordinate: 12
isReserved: true
- id: 5
name: Table 5
pax: 2
xCoordinate: 56
yCoordinate: 12
isReserved: false
- id: 6
name: Table 6
pax: 4
xCoordinate: 64
yCoordinate: 12
isReserved: false
- id: 7
name: Table 7
pax: 8
xCoordinate: 64
yCoordinate: 35
isReserved: true
- id: 8
name: Table 8
pax: 8
xCoordinate: 64
yCoordinate: 60
isReserved: false
- id: 9
name: Table 9
pax: 4
xCoordinate: 48
yCoordinate: 40
isReserved: false
- id: 10
name: Table 10
pax: 4
xCoordinate: 25
yCoordinate: 60
isReserved: false
- id: 11
name: Table 11
pax: 8
xCoordinate: 11
yCoordinate: 35
isReserved: true
- id: 12
name: Table 12
pax: 8
xCoordinate: 11
yCoordinate: 60
isReserved: true
- id: 13
name: Table 13
pax: 4
xCoordinate: 6
yCoordinate: 87
isReserved: false
- id: 14
name: Table 14
pax: 2
xCoordinate: 15
yCoordinate: 87
isReserved: false
- id: 15
name: Table 15
pax: 4
xCoordinate: 23
yCoordinate: 87
isReserved: true
- id: 16
name: Table 16
pax: 4
xCoordinate: 49
yCoordinate: 87
isReserved: true
- id: 17
name: Table 17
pax: 2
xCoordinate: 58
yCoordinate: 87
isReserved: false
- id: 18
name: Table 18
pax: 4
xCoordinate: 66
yCoordinate: 87
isReserved: true
- id: 19
name: Table 19
pax: 2
xCoordinate: 74
yCoordinate: 87
isReserved: falsedatasources:
floorplan-restaurant-dynamic:
type: 'datasource.sqlite'
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- entity: default/interactive-image
query: |
SELECT
id,
'$.name',
'$.pax',
json_extract(data, '$.xcoordinate') as x,
json_extract(data, '$.ycoordinate') as y,
'$.isreserved',
'$.category'
FROM [default/interactive-image] WHERE '$.category' = 'floorplan-restaurant'Hot seat and meeting room booking example


The example shows how hot seats and meeting rooms at an office can be booked. The groups property is used to differentiate between the types of available bookings, namely, seats, meeting rooms and reserved seats. The maximumPoints property specifies how many of each type can be booked, for example, there are three hot desks for booking.
Examples:
See the full example using static data in GitHub
children:
- type: component.interactive-image
options:
imageHeight: 1500
source:
uri: https://i.pinimg.com/564x/b0/eb/52/b0eb52122452257e955f210e7fdb8f55.jpg
data: [email protected]
pointColor: color10
groups:
- title: Selected desks
id: Selected desks
color: color2
- title: Hot desk - reserved
id: Hot desk - reserved
color: color14
maximumPoints: 3
- title: Meeting room - reserved
id: Meeting room
color: color14
maximumPoints: 1
item:
type: component.interactive-image-item
options:
id: [email protected]
title: [email protected]
icon: [email protected] = true ? 'close' :null
color: [email protected] = true ? 'color3' :null
groupId: [email protected]
style:
isDisabled: [email protected] = true ? true :false
percentageCoordinates:
x: [email protected]
y: [email protected]datasources:
interactive-image-office:
type: datasource.static
options:
data:
- id: 1
name: Meeting Room
xCoordinate: 65
yCoordinate: 43
isReserved: true
group: Meeting room
- id: 2
name: Hot Desk 1
xCoordinate: 22
yCoordinate: 12
isReserved: true
group: Hot desk - reserved
- id: 3
name: Hot Desk 2
xCoordinate: 22
yCoordinate: 22.5
isReserved: false
group:
- id: 4
name: Hot Desk 3
xCoordinate: 22
yCoordinate: 33
isReserved: true
group: Hot desk - reserved
- id: 5
name: Hot Desk 4
xCoordinate: 22
yCoordinate: 44
isReserved: false
group:
- id: 6
name: Hot Desk 5
xCoordinate: 22
yCoordinate: 55.5
isReserved: false
group:
- id: 7
name: Hot Desk 6
xCoordinate: 22
yCoordinate: 66.5
isReserved: true
group: Hot desk - reservedSee also
Last updated
Was this helpful?