|
12 | 12 |
|
13 | 13 | from branca.colormap import LinearColormap |
14 | 14 | 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 |
17 | 18 |
|
18 | 19 | from jinja2 import Template |
19 | 20 |
|
20 | 21 | from six import binary_type, text_type |
21 | 22 |
|
22 | | -from folium.map import FeatureGroup, Icon, Layer, Marker, Popup |
23 | | - |
24 | 23 |
|
25 | 24 | class WmsTileLayer(Layer): |
26 | 25 | """ |
@@ -951,7 +950,7 @@ def __init__(self, bounds, color='black', weight=1, fill_color='black', |
951 | 950 |
|
952 | 951 | class PolygonMarker(Marker): |
953 | 952 | 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): |
955 | 954 | """ |
956 | 955 | Creates a PolygonMarker object for plotting on a Map. |
957 | 956 |
|
@@ -985,9 +984,9 @@ def __init__(self, locations, color='black', weight=1, fill_color='black', |
985 | 984 | ... fill_opacity=0.5, popup='Tokyo, Japan')) |
986 | 985 |
|
987 | 986 | """ |
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 |
991 | 990 | ) |
992 | 991 | self._name = 'PolygonMarker' |
993 | 992 | self.color = color |
@@ -1080,21 +1079,15 @@ class PolyLine(MacroElement): |
1080 | 1079 | color: string, default Leaflet's default ('#03f') |
1081 | 1080 | weight: float, default Leaflet's default (5) |
1082 | 1081 | 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. |
1088 | 1082 | popup: string or folium.Popup, default None |
1089 | 1083 | Input text or visualization for object. |
1090 | 1084 |
|
1091 | 1085 | """ |
1092 | 1086 | def __init__(self, locations, color=None, weight=None, |
1093 | | - opacity=None, latlon=True, popup=None): |
| 1087 | + opacity=None, popup=None): |
1094 | 1088 | super(PolyLine, self).__init__() |
1095 | 1089 | self._name = 'PolyLine' |
1096 | | - self.data = (_locations_mirror(locations) if not latlon else |
1097 | | - _locations_tolist(locations)) |
| 1090 | + self.data = _locations_tolist(locations) |
1098 | 1091 | self.color = color |
1099 | 1092 | self.weight = weight |
1100 | 1093 | self.opacity = opacity |
|
0 commit comments