-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add Leaflet.encoded
plugin: Enable creating PolyLine and Polygon from encoded string
#1928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Leaflet.encoded
plugin: Enable creating PolyLine and Polygon from encoded string
#1928
Conversation
Added type information to for argument to `__init__`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is very clean and looks complete.
I made one small change (added a type annotation). Since this is my first PR review, I will ask for a second check from @Conengmo if he has time. But to me it looks okay to merge.
In hindsight, I'm also considering adding the second functionality the original author provides - |
Do you want to include this in this PR? If so, go ahead, but you can also do it in a later PR. |
Leaflet.encoded
plugin: Enable creating PolyLine and Polygon from encoded string
done @hansthen :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
How long before this can be merged? I'd like to use the 'official' feature :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, well done! I added two small comments, hope you can take a look. Shouldn't take long to get this merged!
folium/plugins/encoded.py
Outdated
super().__init__( | ||
encoded, | ||
) | ||
path_options(line=True, radius=None, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick response! This is not working yet, I suppose you mean to pass these to the super init? Also in the other class.
@Conengmo I appreciate your input on the error. It was an oversight on my end. This PR should be good to go. |
…om encoded string (python-visualization#1928) * add plugin to visualize the polyline from an encoded string * correct import in user guide * Update polyline_encoded.py Added type information to for argument to `__init__` * rework encoded plugin to include PolygonFromEncoded * include doc and tests for PolygonFromEncoded * update doc to include the link of the algo * use path_options instead of parse_options * set path_options to an attribute --------- Co-authored-by: Hans Then <[email protected]>
Fixes #1886
PolyLineFromEncoded
, which accepts an encoded string to make a polyline. Also, add all the relevant docs/tests required for plugin approval.PolygonFromEncoded
, which works the same way as above, but for polygons.FYI @hansthen