Skip to content

Commit d64eb74

Browse files
HerugrimRiverfount
authored andcommitted
Added configurable collapse
1 parent 482933f commit d64eb74

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

flask_googlemaps/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(
3939
scroll_wheel=True,
4040
fullscreen_control=True,
4141
collapsible=False,
42+
mapdisplay=False,
4243
cluster=False,
4344
cluster_imagepath=DEFAULT_CLUSTER_IMAGE_PATH,
4445
cluster_gridsize=60,
@@ -76,6 +77,7 @@ def __init__(
7677
self.scroll_wheel = scroll_wheel
7778
self.fullscreen_control = fullscreen_control
7879
self.collapsible = collapsible
80+
self.mapdisplay = mapdisplay
7981
self.center_on_user_location = center_on_user_location
8082
self.report_clickpos = report_clickpos
8183
self.clickpos_uri = clickpos_uri

flask_googlemaps/templates/googlemaps/gmapjs.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@
233233
}
234234
}
235235
}
236+
{% if gmap.mapdisplay %}
237+
document.getElementById('{{gmap.varname}}_collapse').click();
238+
{% endif %}
236239
};
237240

238241
if (typeof window.onload === 'function') {

0 commit comments

Comments
 (0)