谷歌地图加载图像,如

发布于 2024-11-18 22:32:13 字数 543 浏览 3 评论 0原文

我开始创建一个脚本,允许我将大图像分割成小块,进行缩放、拖动等。

我想知道有什么可能性可以在活动区域​​中加载小图像,例如在 Google 地图(可见)中。我想尝试使用一些计算来确定一个元素的大致位置,并使用 document.elementFromPoint 来确定该元素,但这不是跨浏览器解决方案。

另一个解决方案可能是:从头开始仅加载活动区域中的图像,当用户拖动或缩放时,脚本必须计算活动区域中的新元素。

请参阅此处我的意思是活动区域和非活动区域: https://i.sstatic.net/mRY5K.jpg< /a>

PS:我搜索了整个网站,但没有找到答案。我还阅读了这个主题: Google 地图如何工作? ,但我想我自己开发脚本。 (我不需要谷歌地图的复杂性,只需要几个功能)

I started to create a script that allows me to split a big image into small pieces,to zoom, drag , etc.

I want to know what are the possibilities to load the small images just in the active area like in Google Maps (visible). I thought to try to determine the approximate location of one element with some calcules and to determine the element with document.elementFromPoint, but it's not a cross browser solution.

Another solution could be: loading from the beginning just the images from active area and when the user drag or zoom the script must calculate the elements that are new in active area.

see here what I mean active and inactive area: https://i.sstatic.net/mRY5K.jpg

PS: I searched the entire site but I did not found an answer. I read also this topic : How does Google Maps work? , but I would like to develop myself the script. (I don't need the complexity of Google Maps, just few features)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜嗑 2024-11-25 22:32:13

查看 DeepZoom。它是一个开源项目,完全可以满足您的需求。它是为 .net 编写的...但我认为它可能就是您所寻找的

DeepZoom 是由 SeaDragon 创建的,并且是为 silverlight 构建的,但他们也有一个 Javascript 实现,称为 海龙 Ajax

Look into DeepZoom. Its an opensource project that does exactly what you want. Its written for .net... but i think it might be what your looking for

DeepZoom is created by SeaDragon and is built for silverlight but they also have a Javascript implementation too called SeaDragon Ajax

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文