The location widget allows the user to display a map/ location on the front view of your jig.
The core structure includes: address or pathsData(the path from the start to the end point)
markersData - This property uses the coordinates (latitude and longitude) to set one or more marker(s) on the map
top and bottom - The titles component will be added to the top/ bottom of your widget
footer - Here the additional text with the format can be added
zoomLevel - Numeric value to set the zoom level of the map
The location widget can only be used on jigs of size 2x2, 2x4, 4x2, 4x4.
Examples and code snippets
Location widget using address
Our jig (4x2 view) displays a map with a focus on the provided address
Examples:
See the full example using static data in GitHub.
See the full example using dynamic data in GitHub.
Datasources:
See the full datasource for dynamic data in GitHub.
location-widget (dynamic)
widgets:
4x4:
type: widget.location
options:
address: =@ctx.datasources.location.address
Location widget with multiple markers
See the full example using static data in GitHub.
multiple-markers (static)
widgets:
4x2:
type: widget.location
options:
address: =@ctx.datasources.address.street & ',' & @ctx.datasources.address.city & ',' & @ctx.datasources.address.country
markersData: =@ctx.datasources.points
isAnimationDisabled: true
Our widget (4x2 view) displays a map with multiple markers by coordinates
Location widget displaying path
Our widget (4x4 view) displays a map with path by coordinates.
Examples:
See the full example using static data in GitHub.
location-widget-path (static)
widgets:
4x4:
type: widget.location
options:
pathsData: =@ctx.datasources.coordinates
isAnimationDisabled: true