Worker Map
We provide the ability to customize, show and hide elements in our embeddable Worker Map view. Each of the options can be provided as URL parameters to configure your custom embed experience.
Parameter | Value | Description |
---|---|---|
map-only | true/false | Displays the map only view with all drivers loaded. |
hide-header | true/false | Hides the page header |
hide-controls | true/false | Hides the entire controls section. For more fine-grained control, see the options below: |
hide-search | true/false | Hides the search bar |
hide-filters | true/false | Hides the worker filters (ie, date selector, ops group filter & metadata filter) |
hide-view-switcher | true/false | Hides the button to switch between the map/list views |
hide-driver-export | true/false | Hides the driver export/download button |
hide-driver-create | true/false | Hides the driver create/upload button |
driver-list-state | Base64 encoded string | Base64 encoding of a JSON object with fields described below |
driver-list-state.ops_groups | Array of strings | List of ops groups to display drivers for |
driver-list-state.driver_handles | Array of strings | List of driver handles to display |
driver-list-state.tracking | true/false | If set to true, only displays drivers that are currently tracking |
driver-list-state.profile | string | JSON / JSON PATH expression for profile (metadata) values to filter drivers by. JSON PATH can be used for applying an "OR" clause to metadata filters. For example, passing: "$ ? (@.c1 == \"New York\" | @.c2 == \"San Francisco\" \\ | @.c3 == \"London\")" as the value of profile will filter all drivers that have one of the 3 conditions applicable. |
Example Usage for driver-list-state
let obj = {"ops_groups": ["test-ops-group", "b33ed748-e17f-4d93-905d-7238837736c6"], "tracking": "true"}
let urlEncodedStateString = encodeURIComponent(btoa(JSON.stringify(obj))) // B64 encoding followed by URI encoding
console.log(urlEncodedStateString)
prints:
eyJvcHNfZ3JvdXBzIjpbInBiLXRlc3RpbmciLCJiMjdlZDc0OC1lMTdmLTRkOTMtOTA1ZC03MjM4ODM3NzM2YzYiXSwidHJhY2tpbmciOiJ0cnVlIn0%3D
The above value can then be passed as the value of the driver-list-state
query param.
Updated 3 days ago