Skip to main content

Map

Display GPS and GeoJSON data on a world map.

map panel

Supported messages

To use this panel, your data must provide messages conforming to one of the following supported schemas.

LocationFix

For GPS points with support for displaying the signal accuracy if available.

frameworkschema
ROS 1sensor_msgs/NavSatFix
ROS 2sensor_msgs/msg/NavSatFix
Customfoxglove.LocationFix

GeoJSON

For displaying arbitrary shapes or points.

frameworkschema
Customfoxglove.GeoJSON

Use the name and style fields within the properties field of each GeoJSON feature to label and style objects on the map. For example, the message below will be labeled "Named Polygon" and have the specified styling:

{
type: "FeatureCollection",
features: [{
type: "Feature",
properties: {
name: "Named Polygon",
style: {
color: "#ff0000",
dashArray: "4 4",
lineCap: "butt",
opacity: "1",
weight: 4,
},
},
geometry: ...
}]
}

See the leaflet documentation for additional supported style attributes.

Settings

General

fielddescription
Tile LayerType of source image: "Map", "Satellite", or "Custom"
Custom map tile URLDisplayed only when the "Custom" tile layer is selected; URL to your custom map tiles, in https://my.custom.url/{x}/{y}/{z}.png format following the Tile Map Service specification
Max tile levelDisplayed only when the "Custom" tile layer is selected; highest zoom supported by the custom map source. See leaflet documentation for more information.
Follow topicTopic to follow in the panel viewport

Topics

The Topics section allows you to toggle visibility and settings for individual topics.

fielddescription
ColoringColor mode for the GPS or GeoJSON features.
Automatic: color is automatically assigned
Custom: you pick the color
Point styleConfigure GPS location display.
Dot: display GPS locations using a circle
Pin: display GPS location using a "pin" marker (the pin marker is a fixed blue color).
History modeControl display of previous or future messages.
All: display all available messages for the topic.
Previous: display messages up to the latest message (as they arrive)
None: display only the latest message

Custom map layers

Load custom map layers by pointing to a URL that serves rasterized slippy tiles following the Tile Map Service specification with Web Mercator projection. See Leaflet's TileLayer documentation for more information on URL template construction. Most Open Street Map based services will work for this. See Switch2OSM for more information on serving your own tiles.

User interactions

  • Hover over the playback bar to highlight map points corresponding to that time
  • Hover over a point on the map to highlight its corresponding time in the playback bar
  • Click a map point to seek playback to that time
  • Scroll over the map to zoom; drag the map to pan (zoom and pan levels will be persisted to the layout)