Git Product home page Git Product logo

Comments (2)

moagrius avatar moagrius commented on August 22, 2024

Regarding rendering tiles on drag - that's something you can easily implement yourself with the public API. Just add a MapEventListener/Implementation and override onDrag with a call to requestRender. That said, my personal opinion and experience are that the widget feels far less responsive - even when decoding the bitmap off the UI thread, rendering tiles while dragging feels shaky. You can use downsamples to provide lower quality visual feedback while the tiles render.

In response to your first point, I think google maps and osmdroid do that because there tiles are generally fetched over http and require a lot more time than is required with bundled assets. I have implemented this feature before, and even with a single adjacent tile it can get to be a pretty heavy and expensive operation (a 2x2 tile viewport with 1 adjacent tile would go from 4 total tiles to 16, a 400% increase). That said, it'd be fairly trivial to add an offset (fixed pixels, or multiplier) to the viewport Rect that's passed (rather than an number of tiles), and wouldn't threaten the existing API, so I'll consider it as an enhancement / feature request.

Thanks for your input.

from mapview.

moagrius avatar moagrius commented on August 22, 2024

The first point (padding the viewport) has been included and will be available with the next minor update. Thanks.

from mapview.

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.