You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Erik Vullings edited this page Jul 15, 2015
·
1 revision
Problem
We needed a way to add features on the map and suggestions/actions in the Kanban when certain conditions occurred. For example, this allowed us to script a scenario, or to generate context specific actions.
Solution
The solution that we chose was to implement a simple rule engine (see the rules folder).
Rules
Rules can be added to any GeoJSON feature in feature.property._rules, which is an array of rules. However, a rule can also be specified using an empty feature, i.e. a feature without a geometry, using the same structure. Each rule consists of an optional conditions array, and one or more actions that are executed when the condition evaluates to true.