dylanfprice / angular-gm

AngularJS Google Maps Directives
MIT License
197 stars 47 forks source link

IE 8: Object.defineProperties error #15

Closed steve228uk closed 10 years ago

steve228uk commented 11 years ago

It looks like this is throwing an error in IE 8 for Object.defineProperties, wrapping it in a try/catch should fix it.

http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx

Update: I've fixed that issue with a try/catch locally, but it's now only showing a single marker in IE8

dylanfprice commented 11 years ago

I won't be able to spend time trying to fix this... but if you figure it out let me know!

zemirco commented 10 years ago

I had the same problem. I fixed it by using a polyfill and calling gm-map as an attribute and not as an element.

Here is a quick example:

<!--[if lte IE 8]>
  <script src="js/es5-polyfill.js'></script>
<![endif]-->

<div gm-map gm-map-id="'myMap'" gm-map-options="options.map">
  ...
</div>