Skip to content

Commit

Permalink
1.0.0 Release (#11)
Browse files Browse the repository at this point in the history
Summary: 

- Adds support for channel groups and (fixes #6) 
- Support array of channels
- Transition from under_score the camelCase to match PubNub JS V4
- Move Mapbox.js to bower_components (fixes #10)
- Publish to npm via package.json
- Fix bug for multiple updates called at same time

Commits:

* add package.json
* update gitignore and package.json
* add initial support for channel groups, rename channel -> channels, and add documentation
* remove console logs
* underscore to camel case
* bump versions to 0.4.0
* history fixes
* fix animation bugs for multiple updates at same time
* history fixes and remove debug: true from examples
* new channel groups example, fix distributed example
* bump to 1.0.0
* fix #10 by adding mapbox via bower
  • Loading branch information
ianjennings committed Oct 18, 2016
1 parent 971d31e commit 482723c
Show file tree
Hide file tree
Showing 35 changed files with 21,836 additions and 157 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
node_modules
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var pn = new PubNub({
var map = eon.map({
pubnub: pn,
id: 'map',
mb_token: 'mapbox api token',
mb_id: 'mapbox map id',
mbToken: 'mapbox api token',
mbId: 'mapbox map id',
subscribeKey: 'demo',
channel: 'my map channel'
});
Expand All @@ -40,8 +40,10 @@ var map = eon.map({
Parameter | Value | Default
| :------------ |:---------------| -----:|
| id | The ID of the element where the map will be rendered. | ```undefined```
| mb_token | Mapbox API Token. | ```undefined```
| mb_id | Mapbox Map ID. | ```undefined```
| mbToken | Mapbox API Token. | ```undefined```
| mbId | Mapbox Map ID. | ```undefined```
| channels | An array of PubNub channels to subscribe to. Either ```channels``` or ```channelGroups``` must be supplied. | ```false```
| channelGroups | An array of PubNub channel groups to subscribe to. Either ```channels``` or ```channelGroups``` must be supplied. | ```false```
| transform | Method for changing the payload format of your stream. See [example](https://github.com/pubnub/eon-map/blob/master/examples/transform.html) | ```function(m){}```
| history | Use PubNub history call to retrieve last message. This will display points at their last known location. Requires [PubNub storage](http://www.pubnub.com/how-it-works/storage-and-playback/) to be enabled. | ```false```
| pubnub | An instance of the PUBNUB javascript global. This is required when using your own keys. See the ```subscribeKey``` example. | ```false```
Expand All @@ -66,9 +68,9 @@ var map = eon.map({
pubnub: pn,
eon.map({
id: 'map',
mb_token: 'pk.eyJ1IjoiaWFuamVubmluZ3MiLCJhIjoiZExwb0p5WSJ9.XLi48h-NOyJOCJuu1-h-Jg',
mb_id: 'ianjennings.l896mh2e',
channel: channel,
mbToken: 'pk.eyJ1IjoiaWFuamVubmluZ3MiLCJhIjoiZExwb0p5WSJ9.XLi48h-NOyJOCJuu1-h-Jg',
mbId: 'ianjennings.l896mh2e',
channels: [channel],
connect: connect
});
```
Expand Down Expand Up @@ -151,7 +153,7 @@ var pn = new PubNub({
var map = eon.map({
pubnub: pn,
id: 'map',
mb_id: 'ianjennings.l896mh2e',
mbId: 'ianjennings.l896mh2e',
//...
message: function (data) {
map.setView(data[3].latlng, 13);
Expand Down Expand Up @@ -192,9 +194,9 @@ You can supply a custom Mapbox marker object with custom tooltips by extening th
var map = eon.map({
pubnub: pn,
id: 'map',
mb_id: 'ianjennings.lec77m70',
mb_token: 'pk.eyJ1IjoiaWFuamVubmluZ3MiLCJhIjoiZExwb0p5WSJ9.XLi48h-NOyJOCJuu1-h-Jg',
channel: 'rutgers-bus-data',
mbId: 'ianjennings.lec77m70',
mbToken: 'pk.eyJ1IjoiaWFuamVubmluZ3MiLCJhIjoiZExwb0p5WSJ9.XLi48h-NOyJOCJuu1-h-Jg',
channels: ['rutgers-bus-data'],
rotate: true,
history: true,
marker: function (latlng, data) {
Expand Down Expand Up @@ -226,11 +228,11 @@ You can set the `pubnub` init parameter when using Eon Maps. This allows you to
var pn = PUBNUB({ subscribeKey : 'YOUR_SUBKEY_HERE', ssl : true });
var channel = 'my-map';
var map = eon.map({
pubnub : pn, // < - - - here < - - - //
channel : channel,
id : 'map',
mb_id : 'mapbox.streets',
mb_token : 'pk.ey31IjoiaWRtc3giLCJhIjoiZZ1zMGI2ZjBlNTMxZjk5YTEwNjM5WNJlOWI4MmJiZGIifQ.U1jMQo2QVeuUtt85oD7hkQ'
pubnub: pn, // PubNub goes here
channels: channel,
id: 'map',
mbId 'mapbox.streets',
mbToken: 'pk.ey31IjoiaWRtc3giLCJhIjoiZZ1zMGI2ZjBlNTMxZjk5YTEwNjM5WNJlOWI4MmJiZGIifQ.U1jMQo2QVeuUtt85oD7hkQ'
});
</script>
```
Expand Down
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eon-map",
"version": "0.3.2",
"version": "1.0.0",
"homepage": "https://github.com/pubnub/eon-map",
"authors": [
"Ian Jennings <ian@meetjennings.com>"
Expand Down Expand Up @@ -30,6 +30,7 @@
"tests"
],
"dependencies": {
"pubnub": "~4.0.10"
"pubnub": "~4.0.10",
"mapbox.js": "^2.4.0"
}
}
38 changes: 38 additions & 0 deletions bower_components/mapbox.js/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "mapbox.js",
"main": [
"mapbox.css",
"mapbox.js",
"images/*"
],
"version": "2.4.0",
"homepage": "https://github.com/mapbox/mapbox.js",
"authors": [
"Mapbox"
],
"description": "Mapbox Javascript API",
"keywords": [
"mapbox",
"leaflet",
"maps",
"map"
],
"license": "See LICENSE.md",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"examples"
],
"_release": "2.4.0",
"_resolution": {
"type": "version",
"tag": "v2.4.0",
"commit": "a354d1ca720b68ad46ce21ac2957ffa6f671225b"
},
"_source": "https://github.com/mapbox/mapbox.js-bower.git",
"_target": "^2.4.0",
"_originalSource": "mapbox.js",
"_direct": true
}
50 changes: 50 additions & 0 deletions bower_components/mapbox.js/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Mapbox.js

Copyright (c), Mapbox
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name "Mapbox" nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Contains parts of L.UTFGrid

Copyright 2012 David Leaver

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 changes: 21 additions & 0 deletions bower_components/mapbox.js/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "mapbox.js",
"main": [
"mapbox.css",
"mapbox.js",
"images/*"
],
"version": "2.4.0",
"homepage": "https://github.com/mapbox/mapbox.js",
"authors": ["Mapbox"],
"description": "Mapbox Javascript API",
"keywords": ["mapbox", "leaflet", "maps", "map"],
"license": "See LICENSE.md",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"examples"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 482723c

Please sign in to comment.