在浏览器中显示大图像:允许缩放:单击时,添加标记和标记检索像素 x/y
感觉我想做的事情应该相当常见,但我找不到任何插件可以做到这一点。
我想在浏览器中显示大图像,允许用户放大它(像 Zoomify 或地图查看器这样的 UI),并允许用户单击图像并添加标记。标记应返回原始图像的像素 x/y 坐标。
它基本上只是用户标记图像中特定像素 x/y 值的一种方法。
图像是否平铺(如 Zoomify)或是否只是带有缩放控件的简单图像并不重要。我宁愿使用 jquery 而不是 flash,但无论哪种方式都没关系。
任何帮助将不胜感激。
谢谢。
It feels like what I want to do should be fairly common, but I can't find any plugins that do it.
I want to display a large image in the browser, allow the user to zoom in on it (a UI like zoomify, or like a map viewer), and allow the user to click on the image and add a marker. The marker should return the pixel x/y coordinates of the original image.
It's basically just a way for a user to tag a particular pixel x/y value in an image.
It doesn't matter if the image is tiled, like zoomify, or if it's just a simple image with a zoom control. I'd rather use jquery than flash, but it doesn't matter either way.
Any help would be greatly appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
OpenLayers 是为地图编写的 - 它可用于平移和缩放平铺图像。
它是根据地图制作的,所以我不确定你是否可以使用它。
有用于添加标记、读取点击坐标等的扩展。
OpenLayers is written for maps - it can be used to pan and zoom through a tiled image.
It's made with maps in mind so I'm not sure if you can use it.
There are extensions for adding markers, reading the coordinates of a click, etc.
查看此 jQuery 教程。您可以修改它以满足您的需要。
根据教程:以下是查找特定元素而不是页面内的位置的示例:
Check out this jQuery tutorial. You can modify this to suit your needs.
Per the tutorial: Here is an example of finding the position within the particular element rather than the page: