Viewing entities on a map

In development and test environments, you can use Insight Map Viewer to view real-time changes to entities with geographic locations.

If your solution involves entities that have geospatial attributes, you can use Insight Map Viewer to view the entities and how they change in response to events. The visualization of the geospatial entities complements the detailed data that you obtain from Insight Inspector.

To view an entity in Insight Map Viewer, the model must define a geospatial attribute of the entity. Concepts do not appear in the map, even if they have a geometry. The following example shows an entity that has a location attribute, which is defined as a point:

a flight is a business entity identified by an id.
a flight has a location (a point).

To define an entity that moves, and appears to move in real time in Insight Map Viewer, use the a moving geometry type. The following example defines an entity that is named delivery van, which includes a moving location.

a delivery van has a location (a moving geometry) used as the default moving geometry.

The location of the entity can then be updated by sending an event with a geospatial attribute to transmit a new location for the entity. The following example shows a van location event type that is related to a delivery van, and has a geometry attribute to update the location of a delivery van.

a van location is a business event related to a delivery van.
a van location has a driver.
a van location has a status (a van status).
a van location has a current location (a point).

The van location event type must then be processed by a rule or a Java™ agent to initialize the entity attribute, and move it to a new location. For example, a set action can be used in the then part of a rule to initialize an entity, and a move action can be used to update the location of an entity.

- set <attribute> of [attribute of]* <entity> to a new moving geometry [tracked for <calendar period>]
- move <attribute> of <entity> to <geometry value> at <date & time>

In a Java agent, use the GeometryFactory API to retrieve and set objects with geospatial attributes. The following code sets the longitude and latitude of a flight entity.

GeometryFactory gf = GeoSpatialService.getService().getGeometryFactory();
Point point = gf.getPoint(longitude, latitude);
flight.setLocation(point);

Example: Car rental agency

Consider a solution for a car rental agency. You can create entities with moving geometry attributes to represent the vehicles that are rented. Entities with static geometry attributes can represent the locations of the business partners. By using a map to view the moving vehicles and the locations of all the partners, you can quickly check whether the solution is working as you expect it to.

You can also highlight the entities on the map with different colors and symbols to indicate their status based on attributes that are in your model, such as the type of vehicle or whether a partner is open or closed.