20
20
from branca .element import CssLink , Element , Figure , Html , JavascriptLink , MacroElement # noqa
21
21
from branca .utilities import _parse_size
22
22
23
- from folium .utilities import _validate_coordinates , _validate_location
23
+ from folium .utilities import _validate_coordinates , _validate_location , get_bounds
24
24
25
25
from jinja2 import Environment , PackageLoader , Template
26
26
@@ -656,7 +656,7 @@ def __init__(self, location, popup=None, icon=None):
656
656
{% macro script(this, kwargs) %}
657
657
658
658
var {{this.get_name()}} = L.marker(
659
- [{{this.location[0]}},{{this.location[1]}}],
659
+ [{{this.location[0]}}, {{this.location[1]}}],
660
660
{
661
661
icon: new L.Icon.Default()
662
662
}
@@ -666,11 +666,12 @@ def __init__(self, location, popup=None, icon=None):
666
666
""" )
667
667
668
668
def _get_self_bounds (self ):
669
- """Computes the bounds of the object itself (not including it's children)
670
- in the form [[lat_min, lon_min], [lat_max, lon_max]]
671
669
"""
672
- return [[self .location [0 ], self .location [1 ]],
673
- [self .location [0 ], self .location [1 ]]]
670
+ Computes the bounds of the object itself (not including it's children)
671
+ in the form [[lat_min, lon_min], [lat_max, lon_max]].
672
+
673
+ """
674
+ return get_bounds (self .location )
674
675
675
676
676
677
class Popup (Element ):
0 commit comments