-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Core] Fix wrong maxzoom
setting of tileSet when using URL source
#15581
Conversation
@zmiao I don't understand how this PR addresses the issue in #15501. Specifically, how will the vector source be updated with There may be value in adding the functionality as proposed here, but it's not clear how that would be exposed in the SDKs. |
@asheemmamoowala As I understand, the original description of #15501 was a side issue, ie. "While debugging an issue...". It looks like this PR fixes that original issue that #15501 refers too. @zmiao's description of this PR does seem to explain the issue I originally had and does as far as I can tell without testing it, appear it would fix the original issue. |
maxzoom
setting of tileSet when using offline databasemaxzoom
setting of tileSet when using URL source
@asheemmamoowala, the pr will fix issue of #15501 and the customer issue. The issue of #15501 is when using an URL source in online mode, even though in the style the Then it was further pointed out in #15501 that there was sparse symbols rendered with offline pack, which is related to the customer's original issue. The customer issue is that there was obvious differences of rendering appearance between JS and the core with offline pack. The root cause is the wrong Thanks to the comments, I realized the title and the description is kind of misleading. |
d329dc4
to
cf15509
Compare
dca1e25
to
c998482
Compare
I tested out the SNAPSHOT release and as far as I can tell it fixes the issue! |
Fix: #15501
The pre-condition is we try to download an offline pack from an URL source, and the source's maxzoom(let's say zoom level 17) is higher than the maxzoom(let's say zl12) we downloaded for the offline pack.
Next we try to use the offline pack from a style that having the same URL source plus a
maxzoom
option zl12, the final rendering result is different from JS.The problem is the ignorance of
maxZoom
option in style, which leads to wrong setting of thezoomRange
in tileSet, zl17 is set instead of zl12. If we need the map to be overscaled to zl14, the renderable TileID should be overscale Zoom 14 plus canonical Zoom12.However, zl17 as the max zoom in
zoomRange
is higher than zl14, zl14 is not taken as overscaled. With offline database of maxzoom 12, there is no way to find tiles in zl14. it tries to check zl14's children, and apparently, with offline, there won’t be more children for zl14. Then it starts to down grade the overScaled zoom by 1, so from 13, then 12, until it found tiles with zl12. So the rendenrable TileId we finally created has oversacalZ 12 instead of 14.It finally causes incorrect
overscaledZ
value is passed tosymbolLayout
, so the rendering result of symbols is different when comparing with JS.