Tilemaker generation versus tile rendering #788
Replies: 3 comments
-
I wonder if the issue here is #771. Assuming you're using the latest source, if you set |
Beta Was this translation helpful? Give feedback.
-
Thank you for your feedback. mapFeatureCoordinates 139.75313186645508,35.693831121450316 for zoom 10.496414441800132 I've started to log out the One workaround I'm thinking of, is to:
|
Beta Was this translation helpful? Give feedback.
-
Could you put the pages and tiles somewhere public so I can take a look? |
Beta Was this translation helpful? Give feedback.
-
First of all, I'm sorry in advance as I'm not sure if my issue lies in my tilemaker config or in my maplibre-gl setup. I've decided to start asking here as I found the tilemaker community very re-active.
Issue
I have a map instance of maplibre-gl, that fetches tiles that have been generated via Tilemaker.
I have POI - cities that are stored in my layer
poi
. They have a minZoom set to 10 / maxZoom set to 14 in my tilemaker configuration. When the user clicks on a rendered feature (so for instance, when the user "sees" a city POI (rendered as a point) on the map, and clicks on it), the following actions occur:flyTo
to zoom 19 (to "bring" the user closer to their clicked POI)maplibre.Marker
based on those coordinates.The issue that I have is that I end up with a maplibre-marker completely off my initial POI coordinates, as you can observe in the picture below:
As mentioned in the Tilemaker documentation, I don't think it's worthwhile to generate tiles beyond zoom level 14. That said, I'm curious to understand what I'm doing wrong and whether the root cause of the issue lies within my Tilemaker or my MapLibre style/config setup.
However, my gut feeling is that beyond zoom level 14, MapLibre GL may be "extrapolating" the coordinates of the last rendered feature (up to zoom 14), which could be causing the distortion in my render.
I've also tried to "change" the maxZoom of the source layer
poi
and could not find a better solution than setting it to 14 (any value above and the data would not be rendered at all, which is compliant with their documentation on this setting).I'm using maplibre-gl on a mobile version, and zoom 14 is still very "low" in terms of resolution, hence the reason why I need to zoom up to 19 to really focus the viewport on the POI.
Tilemaker Config
"poi": { "minzoom": 10, "maxzoom": 14 }
Maplibre style
"poi": { "type": "vector", "tiles": ["japan/{z}/{x}/{y}.pbf"], "maxzoom": 14, "promoteId": "id" },
{ "id": "poi", "type": "symbol", "source": "poi", "source-layer": "poi", "minzoom": 10, "layout": { "icon-size": 1, "text-anchor": "top", "text-field": "{name}", "text-font": [ "case", [ "==", ["get", "class"], "place" ], [ "literal", ["Noto Sans Bold"] ], [ "literal", ["Noto Sans Regular"] ] ], "text-offset": [0, 1], "text-max-width": 9, "text-optional": true, "text-allow-overlap": false, "paint": { "text-color": "#666", "text-halo-blur": 0.5, "text-halo-color": "#ffffff", "text-halo-width": 2 } },
Beta Was this translation helpful? Give feedback.
All reactions