dburles / dburles/meteor-google-maps

on mobile (Android & iOS) : google undefined

Open
#153 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
194
Forks
48
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mobile-config.js and client.js:54, then inspect the GoogleMaps.loaded check and the map creation path shown in dburles_google-maps.js. Reproduce the Android and iOS behavior and trace why google.maps.Geocoder is unavailable; done means geocoding and map instantiation no longer produce the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.