Skip to content

Commit 01bdbfc

Browse files
modified code to accomodate custom styles
1 parent 6fa8036 commit 01bdbfc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

flask_googlemaps/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def __init__(
4747
center_on_user_location=False,
4848
report_clickpos=False,
4949
clickpos_uri="",
50+
styles="",
5051
**kwargs
5152
):
5253
"""Builds the Map properties"""
@@ -87,6 +88,8 @@ def __init__(
8788
self.cluster_gridsize = cluster_gridsize
8889

8990
self.fit_markers_to_bounds = fit_markers_to_bounds
91+
self.styles = styles
92+
9093

9194
def build_markers(self, markers):
9295
if not markers:

flask_googlemaps/templates/googlemaps/gmapjs.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
rotateControl: {% if gmap.rotate_control %}true{% else %}false{% endif %},
4141
scrollwheel: {% if gmap.scroll_wheel %}true{% else %}false{% endif %},
4242
fullscreenControl: {% if gmap.fullscreen_control %}true{% else %}false{% endif %}
43+
styles: {{ gmap.styles | tojson }}
4344
});
4445

4546
//center map location on user location

0 commit comments

Comments
 (0)