Skip to content

Commit 690ec2b

Browse files
authored
Merge pull request #1289 from Conengmo/geojson-fix-show
Geojson: fix show=False when not embedding data
2 parents 4affacb + d09fc43 commit 690ec2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

folium/features.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,10 @@ class GeoJson(Layer):
422422
{% if this.style %}
423423
style: {{ this.get_name() }}_styler,
424424
{%- endif %}
425-
});
425+
}).addTo({{ this._parent.get_name() }});
426+
426427
function {{ this.get_name() }}_add (data) {
427-
{{ this.get_name() }}.addData(data)
428-
.addTo({{ this._parent.get_name() }});
428+
{{ this.get_name() }}.addData(data);
429429
}
430430
{%- if this.embed %}
431431
{{ this.get_name() }}_add({{ this.data|tojson }});

0 commit comments

Comments
 (0)