如何实现像谷歌地图那样的缩放技巧?
我想重新表述问题我之前问过。
假设有三个不同尺寸的图像:小、中、大。它们代表的图片基本相同,但分辨率不同,因此略有不同。
我想先显示一个小图像。当用户放大它时,我想将其替换为中号。现在用户可以拖动图片并在窗口中滚动它。当用户缩小中图像时,我想用小图像替换它,等等。我想谷歌地图也会做同样的事情。
在 javascript 中实现这个技巧的最佳方法是什么(flash 是第二个选项)?
I would like to rephrase the question I asked before.
Let's say there are three images of different size: small, medium, and large. They represent basically the same picture but with different resolutions and so they are slightly different.
I would like to display a small image first. When a user zooms it in I would like to replace it with the medium one. Now the user can drag the picture and scroll it in the window. When the user zooms out the medium image, I would like to replace it with the small one, etc. I guess Google Maps does the same trick.
What is the best way to implement this trick in javascript (flash is the second option) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
缩放开始时:
类似的缩小算法。
On zoom start:
The similar algorithm for zoom out.