如何使用节点红色在地图上可视化 GPS 坐标?

How to visualize GPS coordinates on a map using Node red?

为此,我正在尝试跟踪 object/vehicle 的位置,我正在使用 GY-GPS6MV2 模块获取 GPS 坐标。我正在将这些值流式传输到 Bluemix - 物联网云平台,并尝试使用 WorldMap 节点从节点红色可视化地图上的数据。但是在这样做时我无法将它们映射到 OpenStreetMap 上。
我已经阅读了 WorldMap 节点上的文档。但无法获得对我有用的见解。在这方面你能帮忙吗?

Link :WorldMap NodeRed

来自世界地图节点文档:

Usage

Plots "things" on a map. The map will be served from {httpRoot}/worldmap

The minimum msg.payload must contain name, lat and lon properties, e.g.

{name:"Joe", lat:51, lon:-1.05} 

name must be a unique identifier across the whole map. Repeated location updates to the same name move the point.

目前您的 msg.payload 是一个带有纬度的字符串,然后是 2 个新行,然后是经度值。您需要构建一个 msg.payload 来匹配文档中的内容。这可能最好直接从 IBM IoT 节点的输出中完成,因为它看起来已经是一个 JSON 对象,这将使提取正确的值变得更容易。