Observations Layer

The MapWeave observations layer shows identifiable real-word beings or objects, such as a person or vehicle, at a particular time and location. It consumes data made up of multiple observations in a format that uniquely identifies each entity - the object or being - with a location and time stamp. MapWeave can then 'connect-the-dots' to infer the trajectory - the path taken - of each entity.

Data Format

An example of ObservationsLayerData is as follows:

const vehicleObservations = {
  entities: { vehicle1: { color: '#F2A688' } },
  observations: {
    vehicle1_1: {
      type: 'observation',
      entityId: 'vehicle1',
      latitude: 49.2827,
      longitude: -123.1207,
      time: new Date('2024-12-16T08:00:00'),
    },
    vehicle1_2: {
      type: 'observation',
      entityId: 'vehicle1',
      latitude: 49.2835,
      longitude: -123.1167,
      time: new Date('2024-12-16T08:05:00'),
    },
    vehicle1_3: {
      type: 'observation',
      entityId: 'vehicle1',
      latitude: 49.284,
      longitude: -123.1123,
      time: new Date('2024-12-16T08:10:00'),
    },
    vehicle1_4: {
      type: 'observation',
      entityId: 'vehicle1',
      latitude: 49.2832,
      longitude: -123.1085,
      time: new Date('2024-12-16T08:15:00'),
    },
    vehicle1_5: {
      type: 'observation',
      entityId: 'vehicle1',
      latitude: 49.2808,
      longitude: -123.106,
      time: new Date('2024-12-16T08:20:00'),
    },
  },
};

Entities

An entity is a physical object or being that can be tracked as they move through space and time and can be assigned a color In the API they are defined as a ObservedEntity in ObservationsLayerData.

Whether entities are displayed as individual observations, trajectories or both can be controlled by changing the mode set in the ObservationsLayerOptions.

They are displayed in 'auto' mode by default. Control the min and max zoom levels in the autoRange objects to control when MapWeave changes between individual observations and trajectories.

Here we see the path of a drone showing the individual observations and the trajectory. Both the observations and the trajectory inherit the color of the entity.

Observations Playground

Log in to view live examples

Observations Playground

Log in to view live examples

Observations

Observations are a series of records of the time, latitude and longitude of an entity and can be assigned a color.

When the observations are shown individually, by setting the mode to 'individual' or 'auto', each observation is represented on the map by a circle. The radius of the circle can be set using the minimumRadiusMeters and radiusPixels properties in the individual object in ObservationsLayerOptions.

A code snippet is shown below, or open the example in the playground to see the full code.

Individual Playground

Log in to view live examples

Individual Playground

Log in to view live examples
const observationsLayerOptions = {
  mode: 'individual',
};

const microAerialVehicleLayer = new ObservationsLayer({
  data: microAerialVehicle,
  options: observationsLayerOptions,
});
const observationsLayerOptions = { mode: 'individual' };

function App() {
  return (
    <>
      <MapWeave options={options}>
        <ObservationsLayer data={microAerialVehicle} options={observationsLayerOptions} />
      </MapWeave>
    </>
  );
}

Trajectories

MapWeave can infer the trajectory, or path, of an entity by linking its observations with a line. Trajectories are only created when the observations are within a set time interval.

When the observations are shown as trajectories, by setting the mode to 'trajectory' or 'auto', the path is represented on the map by a line. The width of the line can be set using the minimumWidthMeters and widthPixels properties in the trajectory object in ObservationsLayerOptions.

By default, MapWeave will infer a trajectory when each observation is less than 60000 milliseconds (1 minute) apart. The interval can be set using the maximumInterval property.

Here the maximumInterval property has been set to 27000 milliseconds, which means that two separate trajectories are created.

A code snippet is shown below, or open the example in the playground to see the full code.

Trajectory Playground

Log in to view live examples

Trajectory Playground

Log in to view live examples
const observationsLayerOptions = {
  mode: 'trajectory',
  trajectory: {
    maximumInterval: 27000,
  },
};

const microAerialVehicleLayer = new ObservationsLayer({
  data: microAerialVehicle,
  options: observationsLayerOptions,
});
const observationsLayerOptions = {
  mode: 'trajectory',
  trajectory: {
    maximumInterval: 27000,
  },
};

function App() {
  return (
    <>
      <MapWeave options={options}>
        <ObservationsLayer data={microAerialVehicle} options={observationsLayerOptions} />
      </MapWeave>
    </>
  );
}

Tracker Nodes

Trajectories can be associated with a node on a network layer by assigning a common id to an entity in observations layer data and the id of the networkNode in network layer data. These nodes are called tracker nodes and can be dragged along a trajectory to estimate the location of an entity at the currentTime.

Set the network layer that contains the tracker node with networkLayerId.

Terms of use

These terms do not alter or supersede any existing agreements between you (or your employer) and us.

By accessing or using any Content you agree to be bound by these Terms of Use. Please review these terms carefully before using the website.

The contents of this website, including but not limited to any text, code samples, API references, schemas, interactive tools, and other materials (collectively, the 'Content'), are made available for informational and internal evaluation purposes only. All intellectual property rights in the Content are reserved. No licence is granted to use the Content for any commercial purpose, or to copy, distribute, modify, reverse-engineer, or incorporate any part of the Content into any product or service, without our prior written consent.

This Content is provided “as is” and “as available,” without any representations, warranties, or guarantees of any kind, whether express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, non-infringement, or accuracy. To the fullest extent permitted by applicable law, we expressly exclude and disclaim all implied warranties, conditions, and other terms that might otherwise be implied.

We disclaim all liability for any loss or damage, whether direct, indirect, incidental, consequential, or otherwise, arising from any reliance placed on the Content or from your use of it, to the fullest extent permitted by applicable law. By continuing to access or use the Content, you acknowledge and agree to these terms.