Closed aditzend closed 7 years ago
You need to make sure that any references to google
are after GoogleMaps.loaded()
is true
Thanks a lot for your reply and your great package! There was a problem with my key.
So I checked/created a new API key but when I have the following I get false
in console:
import { Meteor } from 'meteor/meteor';
import { GoogleMaps } from 'meteor/dburles:google-maps';
Meteor.startup(() => {
GoogleMaps.load({
key: 'my-key-that-is-secret',
libraries: 'geometry,places'
});
console.log(GoogleMaps.loaded());
});
@fvpDev 1. you don't need to import GoogleMaps. 2. GoogleMaps.loaded() is a reactive function (you need to reference it within an autorun)
Hi !
I am using this package together with jeremy:geocomplete version 1.7.0
I am getting this error on a Meteor 1.3 app:
Exception from Tracker afterFlush function: debug.js:41 ReferenceError: google is not defined at GeoComplete.initGeocoder (jquery.geocomplete.js:191) at GeoComplete.init (jquery.geocomplete.js:107) at new GeoComplete (jquery.geocomplete.js:99) at HTMLInputElement. (jquery.geocomplete.js:586)
at Function.each (jquery.js:384)
at jQuery.each (jquery.js:136)
at jQuery.$.fn.geocomplete (jquery.geocomplete.js:582)
at . (Place_create.js:57)
at view.js:199
at Function.Template._withTemplateInstanceFunc (template.js:465)
GoogleMaps is loaded on startup and that does not bring any errors. This happens when the template is rendered.
Any help is very much appreciated!!!!