Skip to content

Commit b202064

Browse files
authored
Merge pull request #49 from alfredopironti/master
Fix typo in object dict
2 parents 4271fea + 1c66b50 commit b202064

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ if __name__ == "__main__":
125125
- **style**: A string containing CSS styles. Defaults to `"height:300px;width:300px;margin:0;"`.
126126
- **identifier**: The CSS ID selector name.
127127
- **cls**: The CSS Class selector name. Defaults to `"map"`.
128+
- **language**: The map language. Defaults to `"en"`.
129+
- **region**: The map region. Defaults to `"US"`.
128130

129131
Also controls True or False:
130132

flask_googlemaps/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def __init__(self,
1919
varname='map',
2020
style="height:300px;width:300px;margin:0;",
2121
cls="map",
22+
language="en",
23+
region="US",
2224
rectangles=None,
2325
circles=None,
2426
polylines=None,
@@ -38,6 +40,8 @@ def __init__(self,
3840
"""Builds the Map properties"""
3941
self.cls = cls
4042
self.style = style
43+
self.language = language
44+
self.region = region
4145
self.varname = varname
4246
self.center = (lat, lng)
4347
self.zoom = zoom
@@ -710,7 +714,7 @@ def as_json(self):
710714
'zoom_control': self.zoom_control,
711715
'maptype_control': self.maptype_control,
712716
'scale_control': self.scale_control,
713-
'streetview_controle': self.streetview_control,
717+
'streetview_control': self.streetview_control,
714718
'rotate_control': self.rotate_control,
715719
'fullscreen_control': self.fullscreen_control,
716720
'cluster': self.cluster,

flask_googlemaps/templates/googlemaps/gmapjs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
{% if not is_googlemaps_loaded() %}
33
{% if GOOGLEMAPS_KEY %}
4-
<script src="//maps.googleapis.com/maps/api/js?key={{GOOGLEMAPS_KEY}}" type="text/javascript"></script>
4+
<script src="//maps.googleapis.com/maps/api/js?key={{GOOGLEMAPS_KEY}}&language={{gmap.language}}&region={{gmap.region}}" type="text/javascript"></script>
55
{% else %}
6-
<script src="//maps.googleapis.com/maps/api/js" type="text/javascript"></script>
6+
<script src="//maps.googleapis.com/maps/api/js?language={{gmap.language}}&region={{gmap.region}}" type="text/javascript"></script>
77
{% endif %}
88
{{ set_googlemaps_loaded() }}
99
{% endif %}

0 commit comments

Comments
 (0)