开发者

Can the opacity of a Google Maps GInfoWindow or GMarker be changed separately from the maps opacity?

I've built a Google Map window that uses two tile layers. The opacity of each layer can be adjusted dynamically using javascript. When I adjust the opacity of a tile layer, all child controls including GMarkers and GInfoWindows inherit the opacity setting. Is there any way to ensure that the Markers and InfoWindows are always visible regardless of the maps opacity? In other words, is there some trick to making sure they're always on top? I'开发者_运维问答ve tried altering the opacity and z-Index of the html in the info window to no effect.

One workaround I've considered is duplicateing the GMarkers on each tile layer, then popping my own custom divs instead of GInfoWindows. If someone has gone that route, I'd appreciate seeing an example instead of reinventing the wheel.


This is not exactly what you are looking for .....

Example

From a library called InfoBox

Using this opacity option:

var myOptions = {

                  opacity: 0.75

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜