Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Map API, need suggestions for how to execute ideas
-
@RocketBlaster05 do you prefer that the file stays named a.loc or something .txt so you can edit it more easily in Pythonista. Please, let me know which name you want.
-
@cvp a.loc is still editable in Pythonista but it would probably be easier to have it set to like locations.txt
Thanks -
@RocketBlaster05 you will see in the script that, at begin, there are 3 parameters
radius = 6371000 # earth radius in meters close_distance = 10 # maximum 10 meters between 2 close pin's close_number = 3 # minimum pin's number to set as a close area
The checking of a close area needs to have at least 3 pin's with a maximum distance of 10 meters to the first one. That will say that
p2 <-- 10m --> p1 <-- 10m --> p3 is a close area even if p2 and p3 are distant or 20m
If you want another criteria tell me.
I could check if all points of a group are less distant of 10m, pair by pair.
More complex process but you can already test the script about graphic, file etc...As soon I receive the name of the file like you prefer, I'll post the file in GitHub
-
@RocketBlaster05 Github done
Please, test it and tell me what.
-
@cvp did some testing.
When green pins are converted into trash, they all combine seamlessly.
However, if I create a trash pin using the user location with the man emoji, it gives me an error on line 91... doesn’t properly delete the pins for some reason.
-
@RocketBlaster05 said:
However, if I create a trash pin using the user location with the man emoji, it gives me an error on line 91... doesn’t properly delete the pins for some reason.
I'll check. Be sure I did not test all... sorry but it is always so.
I'll also modify so a group has all their pin's at maximum distance each of other
-
-
@RocketBlaster05
@cvp said:I'll also modify so a group has all their pin's at maximum distance each of other
Done but not easy to test
-
@cvp tested it... problem mentioned above is fixed. However if all three pins are created from the user’s location with the man emoji then the same issue occurs.
Thanks
-
@RocketBlaster05 said:
However if all three pins are created from the user’s location with the man emoji then the same issue occurs.
🥲 No more time today, sorry, but you have already enough to play/test.
Promised for tomorrow. -
@cvp Okay, I've narrowed down the issue: It seems to only occur if two pins have the same location as one another. Realistically, this would not be an issue, as the gps would most likely update before the person tries to mark another location. However, if somebody were to accidentally mark themselves twice, then this issue still persists. Perhaps there is a way to recognize if a location is already marked, and if so then a new point can't be created on the exact point. Not sure if this would interfere with the process for marking someone's location or not.
If this is possible, I wish that the error message would just be printed in console. From there I could edit it to make a popup occur saying (invalid location) or something of the sort.
Just some thoughts for when you get around to it.
Thanks as always
-
@RocketBlaster05 tomorrow, if my wife let me some free time 🙄
Édit: I need to first correctly understand the bug before to be able to correct it.
-
@RocketBlaster05 said:
there is a way to recognize if a location is already marked, and if so then a new point can't be created on the exact point.
Done ( Github updated) you would get a console.alert message (up to you to put your own text).
I've seen it once but not easy to reproduce (thus to test) because it depends on the current location...Do you know that I could easily make the circle of the crosshairs variable in function of the number of pin's they represent, or even display at center of the crosshairs the number of pin's they represent.
Ask if you want.And I'm almost sure that your next request would be that if a pin just trashed is close to a crosshair area, this pin would be automatically included in this area if the pin is at good distance of each of area's points.
Am I wrong? Even if this process is not so easy. 😀 -
@cvp said
Do you know that I could easily make the circle of the crosshairs variable in function of the number of pin's they represent, or even display at center of the crosshairs the number of pin's they represent.
Ask if you want.Can you explain this a little more? As in the crosshairs would get larger the more pins are nearby? Because if so, that would be great. If this is what you are talking about, then I would prefer if it said on the crosshairs how many pins were combined (not coordinates but rather whole numbers)
And I'm almost sure that your next request would be that if a pin just trashed is close to a crosshair area, this pin would be automatically included in this area if the pin is at good distance of each of area's points.
Am I wrong? Even if this process is not so easy. 😀I’m assuming this would be necessary for what was said above, so, yes that was my next plan lol
-
@RocketBlaster05 said:
I would prefer if it said on the crosshairs how many pins were combined (not coordinates but rather whole numbers)
That is what I wanted to say 🥲 in my poor English.
-
@RocketBlaster05 said:
yes that was my next plan lol
Obviously, not for today because, for me, not so easy, but promised
-
@cvp but what do you mean by variable function? Does it change color, size, etc?
-
@RocketBlaster05 said:
variable function?
Not variable function but variable in function.
If the group contains 3 pin's: small diameter, if it contains 10: big diameter.
But if the drawing contains the number of pin's, this varying diameter is not needed. -
@RocketBlaster05 you know that pin dimension stays fixed, in pixels, even if you are zooming in or out.
What do you think of this (complex) feature (mkmapview overlay) where I draw a circle of 10 meters around the center of the group and small circles at each point included in the group. -
@RocketBlaster05 in the previous example, the trash pin is in the circle but at more than 10 meters from at least one point.