Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on mobile (Android & iOS) : google undefined #153

Open
madc0w opened this issue Sep 20, 2017 · 2 comments
Open

on mobile (Android & iOS) : google undefined #153

madc0w opened this issue Sep 20, 2017 · 2 comments

Comments

@madc0w
Copy link

madc0w commented Sep 20, 2017

In mobile-config.js, we have:

App.accessRule("*.google.com/*");
App.accessRule("*.googleapis.com/*");
App.accessRule("*.gstatic.com/*");

And yet, this:

	Tracker.autorun(() => {
		if (GoogleMaps.loaded()) {
			geocoder.set(new google.maps.Geocoder());
		}
	});

yields the following stack:

(anonymous function) — client.js:54 [ the line above that references google.maps.Geocoder ]
_compute — tracker.js:339
_recompute — tracker.js:358
_runFlush — tracker.js:532
onGlobalMessage — meteor.js:426

We also see, probably when attempting to instantiate a map:

No message (1)
create — dburles_google-maps.js:144
(anonymous function) — dburles_google-maps.js:168
(anonymous function) — blaze.js:1934
_withTemplateInstanceFunc — blaze.js:3744
(anonymous function) — blaze.js:1932
_withCurrentView — blaze.js:2271
Template.googleMap:anonymous — blaze.js:1931
_compute — tracker.js:339
Computation — tracker.js:229
autorun — tracker.js:613
autorun — blaze.js:1944
autorun — blaze.js:3604
(anonymous function) — dburles_google-maps.js:152
(anonymous function) — blaze.js:3398
_withTemplateInstanceFunc — blaze.js:3744
fireCallbacks — blaze.js:3394
(anonymous function) — blaze.js:3487
(anonymous function) — blaze.js:1845
_withCurrentView — blaze.js:2271
(anonymous function) — blaze.js:1844
_runFlush — tracker.js:548
onGlobalMessage — meteor.js:426

@dburles
Copy link
Owner

dburles commented Sep 25, 2017

If the geocoding library is loaded externally make sure that you use loadUtilityLibrary so that the GoogleMaps.loaded covers loading state for it too. Edit: Looks like it's not a utility library

@dburles
Copy link
Owner

dburles commented Sep 25, 2017

Also try this #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants