google地图叠加层 [英] google maps overlay layer

查看:142
本文介绍了google地图叠加层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的谷歌地图的顶部覆盖它。没有与谷歌地图的任何互动,它只是一层在另一个顶部。

i'm trying to put a layer on top of my google maps to cover it up. There doesn't have to be any interaction with google maps, it's just one layer on top the other.

我现在有什么:

<div id="map">
   <div id="overlay"></div>
</div>   

在地图中放置我的google地图,覆盖层有一个大的背景

in the map div i put my google maps, and the overlay layer has a background as big as the map div, but the google maps keeps putting itself on top.

任何一个想法我可以做什么?

Anyone an idee what i can do about it?

推荐答案

API会覆盖您指定给地图的DIV中的任何内容作为容器。
要覆盖地图,您需要将重叠式div放置在地图div之外的位置:absolute

The API will overwrite anything inside the DIV you assign to the map as container. To cover the map you'd need to put your overlay div outside the map div with position:absolute

这篇关于google地图叠加层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆