Jul 2, 2009

Google Maps & MSIE8 click-coordinate offset fix



As you probably know, the google maps api is an intuitive way to display addresses, locations, and information targeted at your users. The api is simple to use, well documented and best of all free for non-enterprise usage.

As with every system, there must be a hiccup somewhere along the line. Take for instance the map that should be visible above. There is a default marker set in the middle and it displays the general location of my hometown. If you click on it, the marker will change position to wherever you clicked.

If you are on any browser besides Microsoft Internet Explorer 8, it should work flawlessly. The problem I'm speaking about lies within MSIE8. If you click anywhere on the map, the marker will change position, however, it's placed with about a 1 ½ inch offset (providing blogger isn't already on the MS compatibility mode listing). This is not the fault of the api....

There is hope though. Microsoft has been generous enough to issue a meta tag that can solve this problem:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

This tag basically forces MSIE8 to emulate it's predecessor MSIE7... And here I was thinking that the browser was an upgrade.

2 comments:

  1. Good old IE. everything always works perfect until i check it in IE....

    ReplyDelete