This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ES document structure | |
| meeting : { | |
| "criteria":{ | |
| "type":"nested", | |
| "properties":{ | |
| "id":{ | |
| "type":"keyword" | |
| }, | |
| "present":{ | |
| "type":"integer" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=YOUR_GOOGLE_MAPS_API_KEY&callback=initialize"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setInterval(function() { | |
| pubnub.publish({channel:pnChannel, message:{lat:window.lat + 0.001, lng:window.lng + 0.01}}); | |
| }, 500); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pnChannel = "map3-channel"; | |
| var pubnub = new PubNub({ | |
| publishKey: 'YOUR_PUB_KEY', | |
| subscribeKey: 'YOUR_SUB_KEY' | |
| }); | |
| pubnub.subscribe({channels: [pnChannel]}); | |
| pubnub.addListener({message:redraw}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var redraw = function(payload) { | |
| lat = payload.message.lat; | |
| lng = payload.message.lng; | |
| map.setCenter({lat:lat, lng:lng, alt:0}); | |
| mark.setPosition({lat:lat, lng:lng, alt:0}); | |
| lineCoords.push(new google.maps.LatLng(lat, lng)); | |
| var lineCoordinatesPath = new google.maps.Polyline({ | |
| path: lineCoords, | |
| geodesic: true, | |
| strokeColor: '#2E10FF' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var map; | |
| var mark; | |
| var lineCoords = []; | |
| var initialize = function() { | |
| map = new google.maps.Map(document.getElementById('map-canvas'), {center:{lat:lat,lng:lng},zoom:12}); | |
| mark = new google.maps.Marker({position:{lat:lat, lng:lng}, map:map}); | |
| }; | |
| window.initialize = initialize; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=YOUR_GOOGLE_MAPS_API_KEY&callback=initialize"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setInterval(function() { | |
| pubnub.publish({channel:pnChannel, message:currentLocation()}); | |
| }, 5000); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pnChannel = "map2-channel"; | |
| var pubnub = new PubNub({ | |
| publishKey: 'YOUR_PUB_KEY', | |
| subscribeKey: 'YOUR_SUB_KEY' | |
| }); | |
| pubnub.subscribe({channels: [pnChannel]}); | |
| pubnub.addListener({message:redraw}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var redraw = function(payload) { | |
| lat = payload.message.lat; | |
| lng = payload.message.lng; | |
| map.setCenter({lat:lat, lng:lng, alt:0}); | |
| mark.setPosition({lat:lat, lng:lng, alt:0}); | |
| }; |
NewerOlder