Skip to content

Commit

Permalink
revert to old google example
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Jul 20, 2017
1 parent 6c89ae2 commit a2063ce
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions examples/google.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@

var channel = 'pubnub-mapbox' + getNonZeroRandomNumber();

var pointA = false;
var pointB = false;

var map = eon.map({
eon.map({
pubnub: pubnub,
id: 'map',
channels: [channel],
Expand All @@ -52,35 +49,6 @@
{elementType: 'labels', stylers: [{visibility: 'off'}]},
{featureType: 'water', stylers: [{color: '#000000'}]}
]
},
message: function(message, timetoken, channel) {

console.log(message, timetoken, channel);

var currentPoint = new L.LatLng(message[0].latlng[0], message[0].latlng[1]);

if(pointA && pointB) {

var pointList = [pointA, pointB];

console.log(pointA)

var firstpolyline = new L.Polyline(pointList, {
color: 'red',
weight: 3,
opacity: 0.5,
smoothFactor: 1
});

console.log(map)

firstpolyline.addTo(map);

}

pointB = pointA;
pointA = currentPoint;

}
});

Expand Down

0 comments on commit a2063ce

Please sign in to comment.