开发者

Google Maps InfoBox Not Displaying Correctly in IE

开发者 https://www.devze.com 2022-12-18 11:11 出处:网络
I can only post one link so here is a reference page with corresponding links: I am using a modified version of extinfowindow for Google Maps v3 (reference link 1)

I can only post one link so here is a reference page with corresponding links:

I am using a modified version of extinfowindow for Google Maps v3 (reference link 1) to display a custom infobox window for my markers. While I successfully implemented the InfoBox in v3, I ran into an issue with IE during testing. The infobox renders correctly in all browsers but IE. However, if I view the infobox HTML directly with IE, it renders correctly. But, when I view the infobox within the map (click on a marker), I see this: (reference link 2). The HTML file is at (reference link 3) and should render fine in any browser when 开发者_开发技巧viewed directly. The infobox javascript I am using is at (reference link 4).

I am not sure why the display only messes up when rendered on the map in IE. I have changed the positioning and class/id to check for any conflicts but have had no luck. The positioning and backgrounds get messed up in IE no matter what I change. I am missing something? Please let me know if I need to give any extra information.


MSIE often needs the correct DOCTYPE to display things with precise alignments.

Try using

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


The solution was to use inline CSS for the info window. When rendering the info window HTML itself, IE processed the CSS correctly. However, when rendering the info window HTML on the map canvas, IE would ignore the tags and would only render inline CSS.

0

精彩评论

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