-
Notifications
You must be signed in to change notification settings - Fork 362
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
Draw Control ( circle) #876
Comments
Adding a reproducible example to this. from ipyleaflet import (
Map,
Circle,
CircleMarker,
DrawControl
)
center = [34.6252978589571, -77.34580993652344]
zoom = 10
m = Map(center=center, zoom=zoom)
dc = DrawControl(
circle={"shapeOptions": {"color": "black", "radius": 50}},
)
def handle_draw(target, action, geo_json):
print(action)
print(geo_json)
dc.on_draw(handle_draw)
m.add_control(dc)
circle = Circle()
circle.location = center
circle.radius = 5000
circle.color = "green"
circle.fill_color = "green"
m.add_layer(circle)
m Steps
The
The geometry is a Here is a short screencast showing the above. Possible Causes/IdeasI am mainly a user, but I thought I would have a look at leaflet.py, in particular the class DrawControl hoping to find a miss-assignment, as far as I could tell nothing looked off. Loading this up into a dev environment, as per the instructions and playing around did not yield any results. Any pointers or ideas as to where the root cause could be? Instantiating and adding |
@giswqs , Is that a site you created or one open up to the public for trying things? |
Sorry, I don't know much about JavaScript. I can only test the Python side of things |
Thanks, @giswqs , you said your example was in python - how did you swap out your leaflet versions for testing that you noted above? v 15 vs 13.3 |
Use one of the following to switch versions.
|
@giswqs - ah thanks, I thought you were speaking of the leaflet versions, not the ipyleaflet versions, my mistake. I found their playground, here it is: On their latest versions both the Circle and CircleMarker, when created from the toolbar, produced the expected shapes. |
Hi!
When I try to draw any circle, once I release the mouse, it automatically converts to a circle marker.
The text was updated successfully, but these errors were encountered: