Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
408 views
in Technique[技术] by (71.8m points)

html - How to set Google map's marker's infowindow max height?

If the contents of the info window of marker is too long, it won't fit into the window, it will overflow at the bottom. How can I fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This problem can also be a result of inherited styles being applied to the info window contents after it has been attached to the map.

For instance: The font size will be calculated based on the default font. When the info window is attached, the font will change based on the inherited CSS and, if it is larger, will overflow of the bottom of the info window.

If you don't want to remove the inherited style (and mostly you don't), you need to explicitly countermand the inherited style in the info window content.

You can find an excellent description of this problem and it's solution at:

Fixing the 'inherited CSS' problem


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...