TomSchimansky / TkinterMapView

A python Tkinter widget to display tile based maps like OpenStreetMap or Google Satellite Images.
Creative Commons Zero v1.0 Universal
594 stars 85 forks source link

Range Circles #32

Open HerbOtto opened 2 years ago

HerbOtto commented 2 years ago

Great job! Thank you for creating this super handy widget.

Feature Request: The ability to add a range circle centered on the specified lat, long with a radius in meters? [with a specified stroke/fill color w/alpha]. This could also be used as a smaller alternate waypoint indicator which would vary in size based on zoom level.

Regards

GijsGoudzwaard commented 1 year ago

Would be a great enhancement to this package. I need this aswel for a project I'm currently building to show a certain range on the map for cases like this image

solarc3 commented 1 year ago

Would love to see something similar or maybe more operations on what we can draw/add to the map

meimar18 commented 1 year ago

Wow this would be fantastic, I am trying to draw some things like ovals with the canvas of the tkintermapview but with no success

meimar18 commented 1 year ago

Would be a great enhancement to this package. I need this aswel for a project I'm currently building to show a certain range on the map for cases like this image

Were you successful with this? I have implemented something for my application but I was thinking of makint it generic to add it as a Pull request.

GijsGoudzwaard commented 1 year ago

Would be a great enhancement to this package. I need this aswel for a project I'm currently building to show a certain range on the map for cases like this image

Were you successful with this? I have implemented something for my application but I was thinking of makint it generic to add it as a Pull request.

I was not able to build this according to the image I linked. The image I showed merely gives an example for my use case. I tried drawing ovals in the canvas itself but with no luck sadly.

meimar18 commented 1 year ago

Would be a great enhancement to this package. I need this aswel for a project I'm currently building to show a certain range on the map for cases like this image

Were you successful with this? I have implemented something for my application but I was thinking of makint it generic to add it as a Pull request.

I was not able to build this according to the image I linked. The image I showed merely gives an example for my use case. I tried drawing ovals in the canvas itself but with no luck sadly.

hi @GijsGoudzwaard I have been capable of drawing it as I show in the image, however I am not satisfied with the degrees to pixel conversion for the radius of the ranges.

I have added it as a parameter to a generic marker, so in case you need it with planes icon, you can use it. image

GijsGoudzwaard commented 1 year ago

Would be a great enhancement to this package. I need this aswel for a project I'm currently building to show a certain range on the map for cases like this image

Were you successful with this? I have implemented something for my application but I was thinking of makint it generic to add it as a Pull request.

I was not able to build this according to the image I linked. The image I showed merely gives an example for my use case. I tried drawing ovals in the canvas itself but with no luck sadly.

hi @GijsGoudzwaard I have been capable of drawing it as I show in the image, however I am not satisfied with the degrees to pixel conversion for the radius of the ranges.

I have added it as a parameter to a generic marker, so in case you need it with planes icon, you can use it. image

Could you show your code? I'm curious how you got it working, as would others be I'm sure.

meimar18 commented 1 year ago

I pretend to make a pull request, but I think branches from outsiders are not supported :S

meimar18 commented 1 year ago

Check my proposed pull requests, as ovals can not have alpha or stipples, drawing it in blank seems like the best option.

GijsGoudzwaard commented 1 year ago

Checked your proposal but I had some problems with it. For instance I could not zoom in or out properly and the circle would sometimes disappear. Also instead of adding a parameter to the set_marker function I would create a class like https://github.com/TomSchimansky/TkinterMapView/blob/main/tkintermapview/canvas_polygon.py so you could add multiple range circles on the map even without a marker, like to polygon. You could probably copy that class and make some small adjustments to make it work, though I have not tried it.