【问题标题】:Google Maps InfoWindow. How to copy the content to clipboard?谷歌地图信息窗口。如何将内容复制到剪贴板?
【发布时间】:2017-05-23 21:37:57
【问题描述】:

这可能是一个愚蠢的问题。每当我将鼠标悬停在某些地方(鼠标悬停)上方时,我都会使用谷歌地图信息窗口来显示一些文本。我希望能够复制显示的文本。欢迎提出任何建议。

谢谢!

【问题讨论】:

  • 我真的从几天开始就遇到了这个问题,在它正常工作之前,但几天后它就不起作用了,没有代码更改等等,有任何关于这个的更新吗?你解决了吗?

标签: copy maps infowindow onmouseover


【解决方案1】:

在信息窗口的内容块内创建一个带有 CSS style="user-select: text !important" 的 div。

var infowindow = new google.maps.InfoWindow({
    content : "<div class='infowindow-content' style='user-select: text !important'>Your content goes inside here...`enter code here`
               </div>"
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-12
    • 2015-10-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多