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
    69685
    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 @ccc last edited by cvp

      @ccc said:

      pin_color = pin_colors.get(title, 1) # default to green

      pinView.pin_color = pin_colors.get(tit, 1)  # default to green
      
      1 Reply Last reply Reply Quote 0
      • cvp
        cvp @RocketBlaster05 last edited by

        @RocketBlaster05 and tell me if you want to see your own photo instead of a purple pin

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

          @RocketBlaster05 or, if you prefer,

          Or, with with some drops of blood 😂

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

            @RocketBlaster05 and if you want to be able to set view type (satellite, flyover...), you can find this here

            See two buttons above right of the map

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

              @cvp said:

              @RocketBlaster05 and tell me if you want to see your own photo instead of a purple pin

              This is a great idea. I would like to incorporate this to make the map feel more personal. This may be a big request but can you also show me how to go about making the map start automatically instead of having to press the button? I would like to make it so the button will mark somebody’s location with an image of like a trash bag. Also, is there a simple command I can use to make the map update somebody’s position? I haven’t tried moving around with the map open so if it already moves automatically then that’s my bad for not checking. Thanks in advance.

              I would like for it to show the face on a little pin, like you showed with the blood. I would like for the memoji to be able to have the trash bag I mentioned before just below it like the blood drop. If that is possible, that would be exactly what I need for my pins.

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

                An image of like a trash bag… 🚮🗑♻️☠️🤢💰💩🤮

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

                  @RocketBlaster05

                  First of all, as we live in different time zones, dialog is not easy and thus there will be a delay, sometimes big, between questions and answers, in both directions.
                  Secondly, as the script becomes bigger and bigger, I had put it in Github, are you used to download it from Github or do you prefer that I always paste it in the forum topic. If a modification is little, I can paste the modified part only, but if it is long, or in different parts of the script, I would need to paste the entire script every time...
                  Your last post contains several requests, thus I have several questions, could you, please, answer to each of them. I number them so you can only answer by 'n°:answer'.

                  1. do you want the two buttons 3D and MapType and their process?
                  2. do you want a photo/emoji instead of the purple pin of your own location?
                  3. map will be visible automatically if you remove the line "v.hidden = True" in the main.
                  4. replace the map button by another icon and process is easy but I need to know exactly which process. The only problem is to identify which pin...

                  This is how I've modified the script in Github, please try it:

                  • no more map button
                  • no trash button, but:
                    • when you tap on a pin, you see a trash button
                    • if you tap it, the green pin is replaced by a trash on a little pin
                      But the file would not be modified, thus, at next run, you would see your pin's back.
                      Perhaps should be better to entirely remove the location without any trash pin but it is your script thus you have to decide the process you want.

                  Where to tap to delete

                  Result

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

                    @ccc said:

                    An image of like a trash bag… 🚮🗑♻️☠️🤢💰💩🤮

                    Why does💰represent trash? I agree to get your trashes 😂

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

                      @cvp github or the forum here is fine. Whatever is easier for you. The github example you provided is excellent.

                      1. Yes, the map type buttons have some helpful implications and I like having it as an option in the program.
                      2. Yes, I want the emoji instead of the purple pin as it is makes more sense for the user.
                      3. I love that the map opens on its own
                      4. Yes. I want the button to make it so that when the user presses it, it will present a ui.load_view(). From there, the ui.load_view() will ask if the user wants to mark their location with trash (where they are currently located). If they say yes, their location will be marked with the trash symbol. I would like to make it so that if the user marks their location with a trash symbol, that location will be saved onto the loc file for the next time the map is opened.

                      P.S. does the map update the user's position automatically or do I need to input code to make that occur?

                      Thanks so much!

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

                        @RocketBlaster05 said:

                        does the map update the user's position automatically or do I need to input code to make that occur?

                        I don't understand that.
                        But first, did you try the way I set as trash.
                        If you have général button to ask something to the user, you would need to also choose the pin.
                        Anyway, do you need that I do something more?

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

                          @RocketBlaster05 said:

                          I would like to make it so that if the user marks their location with a trash symbol, that location will be saved onto the loc file for the next time the map is opened.

                          It should be possible, when you set a location as trash, to add a line in the file with this location and a flag "trash".
                          And when you start the script, it checks for ea h location if it is trashed and set a trash pin.
                          Do you want I program that?

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

                            @cvp For example, if somebody were to drive for about a mile with the map open, will their marker move with them or does it stay still?

                            And yes, I used the trash icons. I would like that process to be applied to the user's location through the button I mentioned earlier. However, to make it more simple maybe, could it just drop another pin on the person's location?
                            For example: The person's emoji is moving across the map, and then they mark their location with the unique trash pin. Their emoji will not get replaced by the trash pin but will just give it a location to be dropped on. Please tell me if I need to explain anything better.

                            Thanks!

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

                              @cvp said:

                              It should be possible, when you set a location as trash, to add a line in the file with this location and a flag "trash".
                              And when you start the script, it checks for ea h location if it is trashed and set a trash pin.
                              Do you want I program that?

                              Yes, that is exactly what I am looking for.

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

                                @RocketBlaster05 said:

                                if somebody were to drive for about a mile with the map open, will their marker move with them or does it stay still?

                                No, pin's location do not move. In the file, their last,Lon are saved and used as is

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

                                  @RocketBlaster05 said:

                                  Yes, that is exactly what I am looking for.

                                  This is done, GitHub updated, try it: set a pin as trash, rerun script and see

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

                                    @RocketBlaster05 said:

                                    I would like that process to be applied to the user's location through the button I mentioned earlier. However, to make it more simple maybe, could it just drop another pin on the person's location?
                                    For example: The person's emoji is moving across the map, and then they mark their location with the unique trash pin. Their emoji will not get replaced by the trash pin but will just give it a location to be dropped on. Please tell me if I need to explain anything better.

                                    Not yet understood, sorry

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

                                      @RocketBlaster05 actually, my script foresees 4 types of pin:

                                      • dropped pin red, becomes green at next dropped, no button accessible when you tap the pin
                                      • user point Green, trash button accessible when you tap the pin
                                      • trash pin, no button accessible when you tap the pin
                                      • person emoji pin for current location, no button accessible when you tap the pin

                                      Do you want to change something?

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

                                        @cvp Could you make it so that the trash button is accessible when you tap the emoji pin? But instead of changing the emoji to trash, could it drop a trash pin onto the map? The location of the trash pin would need to be saved. Thanks!

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

                                          @cvp said:

                                          This is done, GitHub updated, try it: set a pin as trash, rerun script and see

                                          Maybe I missed something, but the trash pins do not seem to be saved when I rerun the map...

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

                                            @RocketBlaster05 said:

                                            Could you make it so that the trash button is accessible when you tap the emoji pin? But instead of changing the emoji to trash, could it drop a trash pin onto the map? The location of the trash pin would need to be saved. Thanks!

                                            I'll do it but no time immediately, in some hours.

                                            A little correction: the emoji pin is not saved in the file actually, it is set at each run in function of real location.
                                            That will say that if you close the program, move in an another location and restart the script, you will not see anymore your previous location.

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