diff --git a/mapwidgets/settings.py b/mapwidgets/settings.py index 46300ab..f24520a 100644 --- a/mapwidgets/settings.py +++ b/mapwidgets/settings.py @@ -49,6 +49,7 @@ ("region", "") ), "LANGUAGE": "en", + "LIBRARIES": "places", "MINIFED": not django_settings.DEBUG, "GOOGLE_MAP_API_SIGNATURE": "", "GOOGLE_MAP_API_KEY": "", diff --git a/mapwidgets/widgets.py b/mapwidgets/widgets.py index 72ca67c..fa61da1 100644 --- a/mapwidgets/widgets.py +++ b/mapwidgets/widgets.py @@ -68,8 +68,8 @@ def media(self): } js = [ - 'https://maps.googleapis.com/maps/api/js?libraries=places&language={}&key={}'.format( - mw_settings.LANGUAGE, mw_settings.GOOGLE_MAP_API_KEY + "https://maps.googleapis.com/maps/api/js?libraries={}&language={}&key={}".format( + mw_settings.LIBRARIES, mw_settings.LANGUAGE, mw_settings.GOOGLE_MAP_API_KEY ) ] @@ -167,8 +167,8 @@ def media(self): } js = [ - 'https://maps.googleapis.com/maps/api/js?libraries=places&language={}&key={}'.format( - mw_settings.LANGUAGE, mw_settings.GOOGLE_MAP_API_KEY + "https://maps.googleapis.com/maps/api/js?libraries={}&language={}&key={}".format( + mw_settings.LIBRARIES, mw_settings.LANGUAGE, mw_settings.GOOGLE_MAP_API_KEY ) ]