我想滚动放大和缩小图像,但该图像上的图钉也保持正确定位。 jQuery

I want to scroll zoom in and out of an image, but also have pins on that image stay positioned correctly. jQuery

所以我想在我创建的地图上添加滚动缩放功能。该地图包含一个图像和位于地图顶部标记位置(图钉)的许多 div。

我发现了一些 jQuery 工具可以让我在图像上滚动缩放。我也可以尝试使用鼠标位置和滚动量来编辑我的 div 的坐标。这是解决此问题的最佳方法吗,或者有人知道任何 jQuery 工具可以让我滚动放大和缩小 div 吗?

这是我找到的一些用于在图像上滚动的工具。

image zoomer

Wheel zoom

您可以尝试使用 leaflet.js. It is a lightweight javascript library meant to be used for maps, but it also work for images. This tutorial could help you start, and you might want to check this post

Here 是一个非常基本的示例。