Welcome to the Excel Script repository designed to facilitate control over Eleos Platform Data, specifically POI Layers, and Individual POIs, using Excel.
The scripts provided in this repository leverage Excel Script, which is essentially TypeScript tailored for Excel automation. With these scripts, users can streamline their workflow, manage Eleos Platform Data, manipulate POI Layers, and handle Individual POIs directly within Excel.
To start using the scripts in this repository, follow these steps:
- Download the repository to your local machine.
- Ensure you have the necessary permissions and access to run scripts within Excel.
- Open Excel and navigate to the Script Editor.
- Copy and paste the desired script code from this repository into the Script Editor. Editing where necessary.
- Save and execute the script.
For more detailed instructions on how to use Excel Script, refer to the official Excel Script documentation.
This script was demoed live during the Eleos Developer Summit of 2024. This script will pull all current custom layers, and upload/delete all specified POI layers, then upload all individual POIs. It requires the starter xlsx file.
Starter Excel file needed to run the complete POI interface file.
Uses the Eleos GET POI Layers API, to display that information in a blank spreadsheet.
Uses the Eleos PUT POI Layers API to PUT Custom POI Layers into Eleos Platform Data.
Example Body:
[
{
"sort": 0,
"label": "Blue Beacon",
"icon": "truckwash",
"filter": {
"predicates": [
{
"string_value": "blue_beacon",
"property": "categories",
"operator": "EQUALS",
"number_value": null,
"boolean_value": null
}
],
"junction_type": "AND"
},
"code": "BLUE_BEACON"
}
]
Uses the Eleos PUT POI API to send a set of POIs to the Eleos Platform Data.
Example Body:
[
{
"id": "112",
"name": "Blue Beacon #112",
"location": {
"longitude": "-84.339417",
"latitude": "33.659323"
},
"full_address": "4170 Old McDonough Rd, Conley, GA 30288",
"data": {
"details": "Phone Number: 217-342-4303"
},
"categories": [
"blue_beacon"
]
}
]
Please remember to refer to the Eleos POI API when making changes to the above scripts.
These fields can cause some confusion, here's some background.
The junctionType
and predicates
fields are used to define how filtering rules are applied to determine whether a POI (Point of Interest) should be included in the layer.
Here's a breakdown:
-
junctionType
: This defines how multiple predicates should be combined. It has two possible values:"AND"
: All predicates must be true for the POI to be included."OR"
: At least one predicate must be true for the POI to be included.
-
predicates
: This is an array of filter conditions that determine which POIs belong to the layer. Each predicate typically has:- A
property
: The attribute being checked (e.g.,"category"
,"name"
, etc.). Can be any top-level field name, or any property in the POI 'data' field. - An
operator
: The comparison type (e.g.,"EQUALS"
,"CONTAINS"
,"GREATER_THAN"
). - A
value
: The expected value for the condition.
- A
Let's say you want to create a POI layer that includes truck stops AND have more than 50 parking spaces. You’d use:
{
"junctionType": "AND",
"predicates": [
{
"property": "category",
"operator": "EQUALS",
"string_value": "Truck Stop"
},
{
"property": "parkingSpaces",
"operator": "GREATER_THAN",
"number_value": 50
}
]
}
Alternatively, if you want to include all Truck Stops OR Rest Areas, you’d use:
{
"junctionType": "OR",
"predicates": [
{
"property": "category",
"operator": "EQUALS",
"string_value": "Truck Stop"
},
{
"property": "category",
"operator": "EQUALS",
"string_value": "Rest Area"
}
]
}