Skip to content

Commit 773b323

Browse files
committed
remove latlon option
1 parent 70c1bdb commit 773b323

1 file changed

Lines changed: 9 additions & 16 deletions

File tree

folium/features.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212

1313
from branca.colormap import LinearColormap
1414
from branca.element import (CssLink, Element, Figure, JavascriptLink, MacroElement) # noqa
15-
from branca.utilities import (_locations_mirror, _locations_tolist, _parse_size,
16-
image_to_url, iter_points, none_max, none_min)
15+
from branca.utilities import (_locations_tolist, _parse_size, image_to_url, iter_points, none_max, none_min) # noqa
16+
17+
from folium.map import FeatureGroup, Icon, Layer, Marker, Popup
1718

1819
from jinja2 import Template
1920

2021
from six import binary_type, text_type
2122

22-
from folium.map import FeatureGroup, Icon, Layer, Marker, Popup
23-
2423

2524
class WmsTileLayer(Layer):
2625
"""
@@ -951,7 +950,7 @@ def __init__(self, bounds, color='black', weight=1, fill_color='black',
951950

952951
class PolygonMarker(Marker):
953952
def __init__(self, locations, color='black', weight=1, fill_color='black',
954-
fill_opacity=0.6, popup=None, latlon=True):
953+
fill_opacity=0.6, popup=None):
955954
"""
956955
Creates a PolygonMarker object for plotting on a Map.
957956
@@ -985,9 +984,9 @@ def __init__(self, locations, color='black', weight=1, fill_color='black',
985984
... fill_opacity=0.5, popup='Tokyo, Japan'))
986985
987986
"""
988-
super(PolygonMarker, self).__init__((
989-
_locations_mirror(locations) if not latlon else
990-
_locations_tolist(locations)), popup=popup
987+
super(PolygonMarker, self).__init__(
988+
_locations_tolist(locations),
989+
popup=popup
991990
)
992991
self._name = 'PolygonMarker'
993992
self.color = color
@@ -1080,21 +1079,15 @@ class PolyLine(MacroElement):
10801079
color: string, default Leaflet's default ('#03f')
10811080
weight: float, default Leaflet's default (5)
10821081
opacity: float, default Leaflet's default (0.5)
1083-
latlon: bool, default True
1084-
Whether locations are given in the form [[lat, lon]]
1085-
or not ([[lon, lat]] if False).
1086-
Note that the default GeoJson format is latlon=False,
1087-
while Leaflet polyline's default is latlon=True.
10881082
popup: string or folium.Popup, default None
10891083
Input text or visualization for object.
10901084
10911085
"""
10921086
def __init__(self, locations, color=None, weight=None,
1093-
opacity=None, latlon=True, popup=None):
1087+
opacity=None, popup=None):
10941088
super(PolyLine, self).__init__()
10951089
self._name = 'PolyLine'
1096-
self.data = (_locations_mirror(locations) if not latlon else
1097-
_locations_tolist(locations))
1090+
self.data = _locations_tolist(locations)
10981091
self.color = color
10991092
self.weight = weight
11001093
self.opacity = opacity

0 commit comments

Comments
 (0)