Javascript 传单1.0如何扩展getPixelBounds?

Javascript 传单1.0如何扩展getPixelBounds?,javascript,leaflet,Javascript,Leaflet,我想扩展视图以渲染更多的瓷砖,因为我的地图是在X轴上进行3D旋转的。 这段代码在版本

我想扩展视图以渲染更多的瓷砖,因为我的地图是在X轴上进行3D旋转的。 这段代码在版本<1:

var getPxBounds = map.getPixelBounds;
map.getPixelBounds = function() {
   var bounds = getPxBounds.call(this);
   // ... extend the bounds
   var value = 250;
   bounds.min.x = bounds.min.x - value;
   bounds.min.y = bounds.min.y - value;
   bounds.max.x = bounds.max.x + value;
   bounds.max.y = bounds.max.y + value;
   return bounds;
};
您能帮助我在1.0.0-b1版中如何执行相同的操作吗? 这里有两个JSB来重现问题:

更新
解决方案如下:

它不能在master上工作的主要原因是,在您的示例中,缩放和平移时不调用map.getPixelBounds,只需在其中放置一个console.log,我就看不到它被触发。我现在没有时间深入研究,但有时事后可能会。谢谢你的回答,传单社区解决了我的问题。原始问题已使用解决方案更新。它无法在master上工作的主要原因是,在您的示例中,缩放和平移时未调用map.getPixelBounds,只需在其中放置一个console.log,我从未看到它被触发。我现在没有时间深入研究,但有时事后可能会。谢谢你的回答,传单社区解决了我的问题。原始问题将更新为解决方案。