From 6da496b7365b92eea836f047980442a145c24aa3 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 17 Jul 2018 17:05:00 -0500 Subject: [PATCH] Correct bug in the Google Maps key inclusion --- app/views/nonprofits/_overview_media.html.erb | 4 ++-- client/js/components/maps/cc_map.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/nonprofits/_overview_media.html.erb b/app/views/nonprofits/_overview_media.html.erb index 9c55079f..02172a7d 100644 --- a/app/views/nonprofits/_overview_media.html.erb +++ b/app/views/nonprofits/_overview_media.html.erb @@ -16,9 +16,9 @@ script.id = 'google_maps' let key = "" if (app.map_provider_options && app.map_provider_options.key) { - key = `api_key=${app.map_provider_options.key}&` + key = `key=${app.map_provider_options.key}&` } - script.src = `https://maps.googleapis.com/maps/api/js?${key}v=3.exp&sensor=false&libraries=places` + script.src = `https://maps.googleapis.com/maps/api/js?${key}v=3.exp&libraries=places` document.body.appendChild(script) <% npo_full_address = Format::Address.full_address(@nonprofit.address, @nonprofit.city, @nonprofit.state_code, @nonprofit.zip_code) %> diff --git a/client/js/components/maps/cc_map.js b/client/js/components/maps/cc_map.js index e3bbf4bf..2ae7ab66 100644 --- a/client/js/components/maps/cc_map.js +++ b/client/js/components/maps/cc_map.js @@ -21,9 +21,9 @@ cc_map.init = function(endpoint, options_obj, query) { script.id = 'google_maps' let key = "" if (app.map_provider_options && app.map_provider_options.key) { - key = `api_key=${app.map_provider_options.key}&` + key = `key=${app.map_provider_options.key}&` } - script.src = `https://maps.googleapis.com/maps/api/js?${key}sensor=false&callback=draw_map` + script.src = `https://maps.googleapis.com/maps/api/js?${key}callback=draw_map` document.body.appendChild(script) set_extra_options(options_obj) } else {