Closed healthycola closed 7 years ago
Yes, rather than updating in the helper, you'll want to do that within the ready
callback. Something like:
Template.myMap.onCreated(function() {
GoogleMaps.ready('myMap', (map) => {
this.autorun(() => {
// reference reactive things here like findOne or Session, reactive-var etc
const lat = Session.get('lat');
const lng = Session.get('lng');
// I *think* this is the correct method, you might want to refer to the Google docs
map.instance.setCenter(..., ...);
});
});
});
Hello!
Is it possible to re render the map if the coordinate (lat/long) change in the backend. If the location().lat/location().long change, I would ideally like the map to update. Is this possible?
Thanks!