Subs form (wip)
This commit is contained in:
parent
3d86418d22
commit
df96b6e51e
14 changed files with 530 additions and 75 deletions
18
imports/startup/client/geolocation.js
Normal file
18
imports/startup/client/geolocation.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
const geolocation = new ReactiveVar();
|
||||
|
||||
Meteor.startup(function() {
|
||||
Meteor.call("geo", function (error, response) {
|
||||
if (error) {
|
||||
console.warn(error);
|
||||
} else {
|
||||
var pos = [
|
||||
response.location.latitude,
|
||||
response.location.longitude
|
||||
];
|
||||
geolocation.set(pos);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
export default geolocation;
|
||||
Loading…
Add table
Add a link
Reference in a new issue