Giter Site home page Giter Site logo

Comments (6)

bdon avatar bdon commented on June 3, 2024 1

Yes, the internal data storage for tiles is on a 1024x1024 grid, and features can exist slightly outside of 1024 depending on the buffer size in at tile creation (tippecanoe).

It is not generally possible to determine correct polygon centroids on tiled data, because a polygon may be clipped at tile edges. You may be able to take advantage of Tippecanoe features to pre-calculate centroids and store those as points in the tileset.

from protomaps-leaflet.

bdon avatar bdon commented on June 3, 2024 1

when you create a leafletLayer pass debug: "blue" or any color and it draws additional information on top

For a single zoom level it will make as many tile data requests as # of tiles needed to cover your screen. The defaults in v1.x are a single data tile (request) covers 1024x1024 screen pixels. In 2.x this will change to 512x512 screen pixels. So for a browser window taking up part of the screen there could be 6 requests. For fullscreen on a 32 inch monitor it could be more like 12. there are also 1-4 additional requests of directory fetch overhead.

from protomaps-leaflet.

bdon avatar bdon commented on June 3, 2024

This looks expected because every 256x256 screen tile is drawn independently, and the feature detection is buffered to implement line stroking without edge artifacts. if Maui is close to the corner of a tile the symbolizer could be called up to 4 times.

I don't see any duplicate calls to the backend in my network tab. Do you see any visual errors?

Screenshot 2024-02-07 at 11 28 34

from protomaps-leaflet.

csbrown avatar csbrown commented on June 3, 2024

Ah. I am calculating centroids for painting in my application. It seems that when polygons are split over tiles, I will need to do something interesting.

Did you notice the large coordinate values? Are those modulo the map size in some way?

from protomaps-leaflet.

csbrown avatar csbrown commented on June 3, 2024

"I don't see any duplicate calls to the backend in my network tab"

I see that your network tab shows a "byte range" - the latest two requests were for adjacent byte ranges. Is it normal to have multiple requests on a zoom event, then?

Are you using some sort of tool to help debug this? Your screenshot looks like it includes a lot of extremely helpful information. :)

from protomaps-leaflet.

csbrown avatar csbrown commented on June 3, 2024

Thanks, this has all been extremely helpful.

from protomaps-leaflet.

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.