jawj / OverlappingMarkerSpiderfier

Deals with overlapping markers in Google Maps JS API v3, Google Earth-style
http://blog.mackerron.com
836 stars 238 forks source link

demo-2 doesn't seem to be working for me #140

Closed htsu1 closed 6 years ago

htsu1 commented 6 years ago

I can run both demo-1 and demo-3 fine. Can someone confirm they are getting an error also? Thanks.

additional info: The error I'm getting is "IndexSizeError" and it's coming from marker.js (GoogleMaps API). When I comment out the 'oms.addListener('format', function(marker, status)' the error is gone.

jawj commented 6 years ago

This seems to be an issue uniquely in IE11, and is about handling of SVG marker icons within the Google Maps API.

The fixes advocated online (about setting size and scaledSize properties on the Icon object) don't appear to help, so I have simply added an X-UA-Compatible tag to the header to make IE11 pretend to be IE10.

It's interesting that demo-3 — which uses data-URI SVG markers — appears to work in IE11, though. This gave me the idea that pre-loading the SVG files in demo-2 might help, but it also doesn't.