EON Map API & SDK Docs 1.1.4

Unsupported SDK

PubNub no longer supports this SDK.

Get code

1<script src="https://pubnub.github.io/eon/v/eon/1.1.0/eon.js"></script>
2<link rel="stylesheet" href="https://pubnub.github.io/eon/v/eon/1.1.0/eon.css"/>

Bower

1bower install eon-map --save

NPM

1npm install eon-map --save

Check out our webpack example.

Hello World

Call eon.map({}). Check out the table of options below for more information.

Required UUID

Always set the UUID to uniquely identify the user or device that connects to PubNub. This UUID should be persisted, and should remain unchanged for the lifetime of the user or the device. If you don't set the UUID, you won't be able to connect to PubNub.

1<div data-id='map'></div>
2<script type="text/javascript">
3
4let channel = 'pubnub-mapbox';
5
6let pn = new PubNub({
7 publishKey: 'YOUR_PUB_KEY', // replace with your own pub-key
8 subscribeKey: 'YOUR_SUB_KEY' // replace with your own sub-key
9});
10
11let map = eon.map({
12 pubnub: pn,
13 id: 'map',
14 mbToken: 'pk.eyJ1IjoiaWFuamVubmluZ3MiLCJhIjoiZExwb0p5WSJ9.XLi48h-NOyJOCJuu1-h-Jg',
15 mbId: 'ianjennings.l896mh2e',
show all 19 lines
Last updated on