Example of tracking a single marker on a map with PubNub and Mapbox.
var pubnub = new PubNub({
publishKey: 'demo',
subscribeKey: 'demo'
});
eon.map({
pubnub: pubnub,
id: 'map',
mbToken: 'YOUR_MAPBOX_TOKEN',
mbId: 'YOUR_MAPBOX_ID',
channels: ['eon-map']
});
var pubnub = new PubNub({
publishKey: 'demo',
subscribeKey: 'demo'
});
setInterval(function(){
pubnub.publish({
channel: 'eon-map',
message:
[
{"latlng":[31,-99]},
{"latlng":[32,-100]},
{"latlng":[33,-101]},
{"latlng":[35,-102]}
]
});
}, 1000);