Code Monkey home page Code Monkey logo

Comments (5)

stephenlb avatar stephenlb commented on July 22, 2024

Using your own PubNub API Keys with Eon Maps

You can set the pubnub init parameter when using Eon Maps. This allows you to configure PubNub client connections with extra security options such a auth_key and your cipher_key. You should also set secure: true and ssl: true as well.

<div id="map"></div>
<script>
  var pubnub  = PUBNUB({ subscribe_key : 'my_own_key', ssl : true });
  var channel = 'my-map';
  eon.map({
    pubnub   : pubnub,  // < - - - here < - - - //
    channel  : channel,
    id       : 'map',
    mb_id    : 'mapbox.streets',
    mb_token : 'pk.ey31IjoiaWRtc3giLCJhIjoiZZ1zMGI2ZjBlNTMxZjk5YTEwNjM5WNJlOWI4MmJiZGIifQ.U1jMQo2QVeuUtt85oD7hkQ'
  });
</script>

I added the docs here: https://github.com/pubnub/eon-map/blob/master/README.md#configure-using-your-own-pubnub-api-keys

from eon-map.

ianjennings avatar ianjennings commented on July 22, 2024

Hey @xianlin,

Sorry, the documentation was outdated. The method you (and @stephenlb) describe is correct.

Ian

from eon-map.

stephenlb avatar stephenlb commented on July 22, 2024

👍 👍👍 👍

from eon-map.

xianlin avatar xianlin commented on July 22, 2024

bus

Thank you guys, finally got it working... will try other services Pubnub offers...

from eon-map.

stephenlb avatar stephenlb commented on July 22, 2024

Very nice!

from eon-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.