Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果另一张更大尺寸的地图改变其缩放级别,有没有办法计算出一张地图的理想缩放比例。想法是使两个地图在可视区域方面保持同步,因为具有相同缩放比例的较小地图将无法以相同的方式查看
通过搜索找到答案。您可以在地图上调用 fitBounds() 函数并将其传递给您希望它适合的边界。所以map1.fitBounds(map2.getBounds());
map1.fitBounds(map2.getBounds());