Code Monkey home page Code Monkey logo

Comments (2)

boardend avatar boardend commented on August 25, 2024

If your concern is about using all the physical pixels available on a high dpi device, then this is already in place (see the QgisXYZDataSource). The pixelRatio is detected/managed by OpenLayers, multiplied with the default tile size (which is 265px in a xyz source) and also passed to the qgis-js renderXYZTile-function to be taken into account for symbols and fonts. So on a HighDPI device (window.devicePixelRatio = 2) one will get 512px (physical pixels) tiles which will be rendered to 256 CSS pixels (the same principle as demonstrated in the High DPI WMTS example)

If your concern is about the amount of parallel renderXYZTile-function calls, we could also go for a custom and dynamic TileGrid with an increased tile size on large maps. But this would mean that we're not in the commonly used XYZ scheme anymore and that the layer has to be recreated when the map size changes (demonstrated in the WMS 512x256 Tiles example)

We could also try to make the QgisCanvasDataSource cache the rendered tiles, as demonstrated in the Tiled WMS example.

from qgis-js.

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.