jquery图像定义区域多边形

发布于 2024-09-30 14:13:13 字数 294 浏览 1 评论 0原文

我正在使用 Jquery 图像注释库(http://code.google.com/p/jquery-image-annotate/) 将标签应用到图像。
它允许我们通过创建一个小矩形框来添加标签,该矩形框可以拖动并放置在图像中的某个区域上,然后进行标记。效果很好。 但是,我的要求是直接单击图像并定义应绘制为多边形或矩形的点。我怎样才能使用 jquery 来做到这一点? 我在谷歌地图编辑工具的一个示例中看到了这一点。我们可以单击地图并定义点,双击它即可完成形状并打开编辑框。

请让我知道我们如何实现这一目标。

谢谢
维什。

I am using Jquery image annotate library (http://code.google.com/p/jquery-image-annotate/)
to apply tags to an image.
It allows us to add tags by creating a small rectangular box that can be dragged and placed on an area in the image and then tagged. Works well.
But, my requirement is to click on the image directly and define points which should be drawn as a polygon or a rectangle. How can i use jquery to do this?
I have seen this in one of the examples in google maps edit tool.We can click on the map and define the points and when double-clicked it completes the shape and opens the edit box.

Please let me know how do we achieve this.

Thanks
Vish.

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

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

发布评论

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

评论(1

将军与妓 2024-10-07 14:13:13

您是否考虑过使用

标记

更新:嗯,听起来你想要的是在图像上绘制。您必须使用不适用于 IE 的画布。如果您已经有了坐标,您可以查看以下任一选项:

Have you considered using the <map> tag?

Update: Well, it sounds like what you want is to draw on top of an image. You would have to use canvas which doesn't work for IE. If you already have the coordinates, you could check out either of these options:

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