Improved SelectionMap
This commit is contained in:
parent
2ef2fee802
commit
29f9a2d476
5 changed files with 106 additions and 76 deletions
|
|
@ -1,18 +1,20 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
Meteor.startup(() => {
|
||||
Meteor.call('geo', (error, response) => {
|
||||
if (error) {
|
||||
console.warn(error);
|
||||
} else {
|
||||
const pos = [
|
||||
response.location.latitude,
|
||||
response.location.longitude
|
||||
];
|
||||
geolocation.set(pos);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
export default geolocation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue