EON Map SDK 1.1.4
Get Code
Hotlink
<script src="https://pubnub.github.io/eon/v/eon/1.1.0/eon.js"></script>
<link rel="stylesheet" href="https://pubnub.github.io/eon/v/eon/1.1.0/eon.css"/>
Bower
bower install eon-map --save
NPM
npm install eon-map --save
Check out our webpack example.
Hello World
Call eon.map({})
. Check out the table of options below for more information.
Note
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. Not setting the UUID
can significantly impact your billing if your account uses the Monthly Active Users (MAUs) based pricing model, and can also lead to unexpected behavior if you have Presence enabled.
<div data-id='map'></div>
<script type="text/javascript">
let channel = 'pubnub-mapbox';
let pn = new PubNub({
publishKey: 'YOUR_PUB_KEY', // replace with your own pub-key
subscribeKey: 'YOUR_SUB_KEY' // replace with your own sub-key
});
let map = eon.map({
pubnub: pn,
id: 'map',
mbToken: 'pk.eyJ1IjoiaWFuamVubmluZ3MiLCJhIjoiZExwb0p5WSJ9.XLi48h-NOyJOCJuu1-h-Jg',
mbId: 'ianjennings.l896mh2e',
channels: [channel]
});
</script>