在Google地图上显示PNG而不会造成死角? [英] Display PNG over Google Maps without creating dead spot?
问题描述
我使用CSS在Google地图上叠加了一个(主要是透明的)PNG,但它在地图上创建了一个很大的死角,用户无法拖动地图。
任何人都可以提出如何解决这个问题?
显而易见的解决方案是使用标记覆盖,但我无法做到这一点 - 请参阅将Google地图标记拖曳至地图中心吗?
谢谢! 尝试添加 pointer-events:none;
添加到覆盖图片的CSS,看看是否允许您点击图片到地图。我在Mozilla Firefox 6中对此进行了测试。您可以单击半透明图像并选择文本:
http: //jsfiddle.net/tJQWx/
I'm overlaying a (mostly transparent) PNG on Google Maps using CSS, but it's creating a large dead spot on the map where the user can't drag the map.
Could anyone suggest how to get round this?
The obvious solution would be to use a marker overlay, but I can't do this - see Keep Google Maps marker in centre of map while dragged?
Thanks!
Try adding pointer-events:none;
to the CSS for the overlay image, and see if this allows you to click through the image to the map. I tested this in Mozilla Firefox 6. You can click through the semi-transparent image and select the text:
http://jsfiddle.net/tJQWx/
这篇关于在Google地图上显示PNG而不会造成死角?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!