Comments (6)
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.
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.
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?
from protomaps-leaflet.
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.
"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.
Thanks, this has all been extremely helpful.
from protomaps-leaflet.
Related Issues (20)
- Map style missing HOT 14
- ERR_CACHE_OPERATION_NOT_SUPPORTED HOT 4
- Leaflet demo link is not working HOT 1
- Documentation map error HOT 3
- Clarification on versioning and API stability needed HOT 6
- Suggestion for CDN deployment documentation HOT 1
- Features disappear at zoom > 14 with Leaflet frontend HOT 3
- Zoom transitions look odd with partial opacity HOT 3
- Maintenance and feature removals for v2.0.0 HOT 2
- Unpkg URL in "How to use" section appears broken HOT 1
- how to send header to protomapsL.leafletLayer() HOT 8
- re-evaluate OffscreenCanvas in 2023
- How to insert headers into tilecache fetch request HOT 1
- Styling parameters? HOT 2
- Missing data HOT 6
- Support of Mapbox Style Specification out-of-the-box HOT 10
- is `queryFeatures` deprecated? HOT 3
- Not able to view PMTILE inside map HOT 3
- Feature request: example of selecting layers in Protomaps Leaflet maps HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protomaps-leaflet.