如何从多个来源发布到一个地图 - PUBNUB

时间:2022-09-18 23:00:22

I want to implement pubnub connected car solution . But I can't find a way to publish from multiple sources into one map.

我想实现pubnub连接汽车解决方案。但我找不到从多个来源发布到一个地图的方法。

For example when I publish message like this:

例如,当我发布这样的消息时:

message: [{"latlng":[37*Math.random(),-82*Math.random()]},
                 {"latlng":[37*Math.random(),-82*Math.random()]},
                 {"latlng":[37*Math.random(),-82*Math.random()]},
                 {"latlng":[37*Math.random(),-82*Math.random()]}]
      });

it takes it as 4 different taxi markers moving around but in real time every different taxi will publish fro different sources/pages. In that case if I send these 4 "latlng" from 4 different pages it takes it as one taxi.

它需要四个不同的出租车标记移动,但实时每个不同的出租车将发布不同的来源/页面。在这种情况下,如果我从4个不同的页面发送这4个“latlng”,则将其作为一个出租车。

Can you please tell me how to implement such scenario?

你能告诉我如何实施这样的场景吗?

1 个解决方案

#1


0  

PubNub EON Maps - Multiple Publish Sources

Have you looked into the PubNub EON Framework?

您是否查看了PubNub EON框架?

There is an example on how to publish from multiple sources and display as separate markers on the map.

有一个示例说明如何从多个来源发布并在地图上显示为单独的标记。

#1


0  

PubNub EON Maps - Multiple Publish Sources

Have you looked into the PubNub EON Framework?

您是否查看了PubNub EON框架?

There is an example on how to publish from multiple sources and display as separate markers on the map.

有一个示例说明如何从多个来源发布并在地图上显示为单独的标记。