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.


    reverse_geocode

    Pythonista
    4
    7
    4056
    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.
    • wnMark
      wnMark last edited by

      Something is wrong with reverse_geocode() today. Slow or no return today. Some hints?

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

        Does anybody know the service behind reverse_gecode()

        The problem is, this method slows down or stops my routine, if I get no answer by reverse_geocode()

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

          Apple's reverse geocoder is rate-limited per app, but there's no specific information about the exact limits, so I'm afraid that I don't really know more than you do.

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

            I should add that reverse_geocode is basically a wrapper around CLGeocoder.

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

              The trick (as with other rate limiting APIs) is to not make too many API calls a second/minute. If you make too many calls then the API will fail to respond until some timeout period has expired. If your app's logic requires you to make a lot of APIs calls then put time.sleep() in between them to avoid passing the calls per second/minute limit. Many APIs now allow you to ask how many calls remain before passing the limit and how long the timeout will last. Unfortunately the interface that @omz mentions above does not specify that so you will need to learn those limits via of trial and error. If you can cache earlier responses to avoid repeated calls with the same values, that will help a lot.

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

                Thank you for your answers. Normally I ask every 10 seconds for my GPS position. I am thinking about how to include a timeout to reverse_geocode().

                Phuket2 1 Reply Last reply Reply Quote 0
                • Phuket2
                  Phuket2 @wnMark last edited by

                  @wnMark , this comment doesn't go to the problems you are having, but just wanted to mention about the lastest beta having an update method for custom views. Just could help simplify your polling code if needed. Anyway, just wanted to mention it. I think it's a fantastic addition.
                  For anyone that has not heard about this you see the last few comments of this thread

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