Skip to content

Instantly share code, notes, and snippets.

View Chris-Murphy's full-sized avatar

Chris Murphy Chris-Murphy

View GitHub Profile
@Chris-Murphy
Chris-Murphy / gist:2393622
Created April 15, 2012 16:13
Google maps async in Meteor
function loadScript() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/js/bootstrap.js';
document.body.appendChild(script);
script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://maps.googleapis.com/maps/api/js?sensor=false&' +
'libraries=geometry,places&callback=themap.initialize';
document.body.appendChild(script);
@Chris-Murphy
Chris-Murphy / gist:2394143
Created April 15, 2012 17:56
MapBlips abridged
var Blips = new Meteor.Collection("blips");
if (Meteor.is_client) {
var handle = Meteor.subscribe('blips', function () {});
var handleClient = Meteor.subscribe('blips_' + clientID, function () {});
Meteor.call('mapBlips', box, clientID, function (error, result){
BlipsClient = new Meteor.Collection('blips_' + clientID);
blips_client = BlipsClient.find({});
}