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

Google Maps not working #4702

Closed
andrewgoz opened this issue Jan 2, 2023 · 4 comments
Closed

Google Maps not working #4702

andrewgoz opened this issue Jan 2, 2023 · 4 comments

Comments

@andrewgoz
Copy link
Contributor

https://github.com/fisharebest/webtrees/blob/4088d8d3a616e1b30a663cd261932bb6c6b9b188/public/js/webtrees.min.js

If I knew where to find the non-minimized version, I would have reported against that.

Search for the text "t.mapProviders[0].children[0].layer". That expression should be assigned to "i", so the code looks like

i=t.mapProviders[0].children[0].layer

@andrewgoz
Copy link
Contributor Author

Found it! Unwanted "let".

let defaultLayer = config.mapProviders[0].children[0].layer;

andrewgoz added a commit to andrewgoz/webtrees that referenced this issue Jan 3, 2023
@ddrury
Copy link
Contributor

ddrury commented Jan 4, 2023

Andrew,
Whilst you are correct in removing the variable definition from the defaultLayer (defaultLayer is already defined earlier) The actual problem is caused by disabling the "OpenStreetMap"`provider in the Control panel - Modules - Map providers page.

@fisharebest the default layer code needs rethinking here. As we can now disable any of the map providers (If they are all disabled then we now throw an error) I think we either need to prevent disabling OpenStreetMap or always default to provider[0], layer[0].

BTW My PR #4165 may be a partial solution (although at present it still has code for default layer)

@ddrury
Copy link
Contributor

ddrury commented Jan 6, 2023

Thinking about this further, I think that implementing my PR #4165 and doing away with the default layer code (always default to provider[0], layer[0]) is the best way to go.

BTW Andrew's PR #4703 fixes a syntax error so is essential

fisharebest pushed a commit that referenced this issue Jan 8, 2023
fisharebest pushed a commit that referenced this issue Jan 8, 2023
@fisharebest
Copy link
Owner

@andrewgoz - thanks for the fix

@ddrury - could you add a description to #4165 explaining the issue being fixed. i.e. how would I reproduce the problem, so that I could test the fix...

ddrury pushed a commit to ddrury/webtrees that referenced this issue Jul 16, 2023
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

3 participants