omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    4
    196
    69668
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cvp
      cvp @RocketBlaster05 last edited by cvp

      @RocketBlaster05 this schéma only to show you that the circle I draw around the center of the group of points is not exactly correct.
      The area where you could add a trash pin which would be automatically included in the group is the darkest green area I have manually contoured.

      If you prefer this solution where I draw a circle of 10m of radius around each point of a group, tell me.

      1 Reply Last reply Reply Quote 0
      • RocketBlaster05
        RocketBlaster05 last edited by

        @cvp I think just the one circle would be best. However I was testing it and the circle seems to have a fairly small range when it comes to transforming the pins. I had a pin well within the circle and it did not update it. Is it based off of other pins or the center of the circle? I also noticed that the center of the circle moved after I got one to transform so that is why I’m asking.

        Thanks!

        cvp 1 Reply Last reply Reply Quote 0
        • cvp
          cvp @RocketBlaster05 last edited by

          @RocketBlaster05 said:

          Is it based off of other pins or the center of the circle?

          A trashed pin will be added to a group only if the distance between this pin and all points of the group is less than 10 meters, thus it is not sufficient that the pin would be inside the circle.
          Don't forget that a group contains points where each point has to be distant of all other ones with less than 10m.
          That's why I propose you the other solution than a centered circle...with this marvelous schéma 😀

          RocketBlaster05 1 Reply Last reply Reply Quote 0
          • RocketBlaster05
            RocketBlaster05 @cvp last edited by

            @cvp ah ok I understand now. After you explained it yes I think your schema would be good.

            cvp 1 Reply Last reply Reply Quote 0
            • cvp
              cvp @RocketBlaster05 last edited by cvp

              @RocketBlaster05 Please confirm That I modify the script to only show circle around each deleted point in a group, as circles superpose, the darker green becomes the group area.

              Ideally, if I could draw only this, it would be the solution, but I think it is very very complex.

              RocketBlaster05 1 Reply Last reply Reply Quote 0
              • RocketBlaster05
                RocketBlaster05 @cvp last edited by

                @cvp that does sound very complex. I’m not going to ask you to do it but if you want to challenge yourself then go ahead. For me what you proposed earlier seems just fine.

                cvp 3 Replies Last reply Reply Quote 0
                • cvp
                  cvp @RocketBlaster05 last edited by

                  @RocketBlaster05 said:

                  . For me what you proposed earlier seems just fine.

                  Try it in updated Github but delete locations.txt first

                  1 Reply Last reply Reply Quote 0
                  • cvp
                    cvp @RocketBlaster05 last edited by cvp

                    @RocketBlaster05 As I replaced small circles of points by big circles of 10m, it is no more very visible where points really are. Thus I changed GitHub version to show big and little circles

                    1 Reply Last reply Reply Quote 0
                    • cvp
                      cvp @RocketBlaster05 last edited by cvp

                      @RocketBlaster05 thé 2 trash are not included because outside the red contour

                      RocketBlaster05 1 Reply Last reply Reply Quote 0
                      • RocketBlaster05
                        RocketBlaster05 @cvp last edited by

                        @cvp Looks good. I could see how this eventually could be confusing but the chances of more than 3 markers being placed within 10m of each other really is unlikely so I think it will not be much of an issue.

                        cvp 2 Replies Last reply Reply Quote 0
                        • cvp
                          cvp @RocketBlaster05 last edited by

                          @RocketBlaster05 Not sure I'll try to solve this problem of inner part, but I'm still open to other easier features and for other bugs of course.

                          RocketBlaster05 1 Reply Last reply Reply Quote 0
                          • RocketBlaster05
                            RocketBlaster05 @cvp last edited by

                            @cvp I know you worked very hard to make these circles appear, but now I need a function to remove them off of the map. The goal here was that after trash was marked, another user would come by (hopefully clean it) then clear the trash marker, as there is no longer trash present. However I want to prevent people from just saying they cleaned it. I would like to make it so that, specifically for the crosshairs, it would take three presses to clear the marker. Once the user presses it once, they can no longer press it, as some variable (set for that specific crosshair) would be set to True, not allowing them to press it again. If they tried to, a message could appear in console saying something along the lines of "You already marked this location as clean."

                            This may be a lot to take in so by all means ask any questions, I'd be glad to clarify things.

                            Thanks as always!

                            cvp 2 Replies Last reply Reply Quote 0
                            • cvp
                              cvp @RocketBlaster05 last edited by

                              @RocketBlaster05 For your information, if interested by technical aspects, it should be possible to draw a filled area with the union of circles drawn around all points of the group using the ObjectiveC object named MKOverlayPathRenderer, created with CGPath to which a UIbezierPath could be converted, and an UIbezierPath is the objectinstance of ui.Path.
                              And this is a only summary 😅.
                              Briefly said, it is very complex for me, but not impossible. Perhaps in a second life.

                              1 Reply Last reply Reply Quote 0
                              • cvp
                                cvp @RocketBlaster05 last edited by

                                @RocketBlaster05 said:

                                clear the marker

                                One more time, obviously due to my English level, I' m notsure that I understand correctly.
                                Could you list an ordered sequence of touch actions (number taps, type of press) and their result.
                                Thanks and sorry

                                RocketBlaster05 1 Reply Last reply Reply Quote 0
                                • cvp
                                  cvp @RocketBlaster05 last edited by cvp

                                  @RocketBlaster05 after reading deeper, would it not be easier if the tap on the crosshair does show a button "clear trash" that you could only pressed once?
                                  Tapping this button should also clear the circles and this status should also be stored in the file.
                                  Correct?

                                  1 Reply Last reply Reply Quote 0
                                  • RocketBlaster05
                                    RocketBlaster05 @cvp last edited by

                                    @cvp Here is what I mean: (Clear is the same thing as remove)

                                    1. Circles are set and user can click on them (as you already have programmed)
                                    2. When the popup happens for the crosshair or a normal trash pin, there should be a button titled "Trash is Cleared"
                                    3. Specifically for the crosshair, however, it should have in the button a set of parentheses of how many presses are still needed to remove the pin. For an example, originally, the pin will say "Trash is Cleared (3)" but after someone presses it, it will then say "Trash is Cleared (2)"
                                    4. For the normal trash pins, it will only take one press to remove them. For the crosshairs, it should take 3 as mentioned above. Simply deleting them from the map and locations.txt file is all that needs to happen.

                                    Hopefully this is understandable. If you need more clarifications just ask. Thanks!

                                    cvp 1 Reply Last reply Reply Quote 0
                                    • cvp
                                      cvp @RocketBlaster05 last edited by

                                      @RocketBlaster05 Wen are the circles them-selves removed?
                                      And you say, removed from the file, sure?

                                      cvp 1 Reply Last reply Reply Quote 0
                                      • cvp
                                        cvp @cvp last edited by

                                        @cvp Can you still add a trash in the group, even when the group has been partially cleaned?

                                        RocketBlaster05 1 Reply Last reply Reply Quote 0
                                        • RocketBlaster05
                                          RocketBlaster05 @cvp last edited by RocketBlaster05

                                          @cvp yes. The idea is that once it reaches zero, any pins in the circle (including those added before it reaches zero) will be removed

                                          cvp 1 Reply Last reply Reply Quote 0
                                          • cvp
                                            cvp @RocketBlaster05 last edited by

                                            @RocketBlaster05 ok, for tomorrow when you wake up, and you would see if I did correctly understand 🙄

                                            RocketBlaster05 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors