Giter Site home page Giter Site logo

Comments (3)

stephenmcd avatar stephenmcd commented on June 1, 2024

Thanks for bringing this up.

We decided not to implement breaking long elevation requests into multiple parts since it could have unpredicatble costs against a user's quota. What I have done though is modified elevation requests to use polyline encoding which should result in much shorter URLs:

86e38dd

Could you give this a try and see how effective it is in your case?

from google-maps-services-python.

wwwald avatar wwwald commented on June 1, 2024

I hadn't thought of using encoded polylines in the URL, that already greatly increases the per-request bandwidth. Seems that 400-420 points in an encoded polyline is about the upper limit of points per request, opposed to 80-85 for unencoded lat/lng lists.

Completely agree on the current solution - it's best to have users work around possible URL length limitations and make them explicitly aware of the requests/quota implications.

from google-maps-services-python.

wwwald avatar wwwald commented on June 1, 2024

I'm currently down to a limit of 380 points per request, that seems to be a number that ensures that 99% of the polyline-encoded URLs stay within the URL length limit.

I haven't looked at the remaining 1% in detail, so it's unclear what exactly makes the polylines run longer in those cases.

from google-maps-services-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.