Hello Chad, I want to thank you for that suggestion. You absolutely correct, using changes to the code you provided fixed remaining JS error that as being thrown in IE. IE is one complicated browser. :)
Sorry to ask you another question, but is there a way to explain why the map is so slow in IE7 or IE8? It is very fast in Firefox or Chrome. It is so slow in IE, that I do not think it is even usable. If I remove colored overlays and just leave markers there, the maps is very quick in IE7 or IE8. Is there is some strange issue in my overlay code? I used pretty generic code, and now only thing I changed was your suggestion for that JS error. http://ez-datasolutions.com/maps/v3/map_example.html http://ez-datasolutions.com/maps/v3/map_example_nooverlays.html Thanks again for your help. Daniel On Mar 23, 12:27 am, Chad Killingsworth <[email protected]> wrote: > It's the same problem. You are making the assumption that the ne.x > value is always greater than the sw.x value. However, as the overlay > is wrapped to the other side of the map, this is no longer the case. > This is resulting in negative values being assigned to div.style.width > and div.style.height. > > To fix it, I just changed line 64 and 65 of overlay.js to: > > div.style.width = (Math.max(ne.x, sw.x) - Math.min(ne.x,sw.x)) + > 'px'; > div.style.height = (Math.max(ne.y, sw.y) - Math.min(ne.y,sw.y)) + > 'px'; > > After that change, I was no longer getting script errors. > > Chad Killingsworth > > On Mar 22, 10:33 pm, dany0212 <[email protected]> wrote: > > > Hello Chad, > > > Thanks a lot for replying. > > > I think I figured out the error on Line:65, it seems one of my lat/ > > long boundaries for one of the overlays was incorrect. > > It seems Firefox did not care for it, GoogleChrome showed overlay with > > incorrect position and IE gave that error. > > Fixing that lat/long boundary fixed that error. > > Thanks a lot for your help. > > > But it seems while that error is gone, IE is still giving error when > > moving maps around and getting to the edge of the overlay to be re- > > drawn in another position. > > Looking at this same page, but only with one overlay Australia: > > >http://ez-datasolutions.com/maps/v3/map_example1overlay.html > > > If you move the map say from right to left and as Australia overlay > > about to be re-drawn on another position, it will give an error, now > > for Line: 64 > > > Very strange, can't seem to understand what else I could be doing > > wrong here. > > > If you see anything else wrong here, I would really appreciate it. > > > Thanks again for your help. > > > Daniel > > > On Mar 16, 10:30 pm, Chad Killingsworth > > > <[email protected]> wrote: > > > For one of your overlays (I didn't try to figure out which one), the > > > statement on line 65 (sw.y - ne.y) returns a negative number. Internet > > > explorer apparently does not like you assigning a negative height > > > value. > > > > Chad Killingsworth > > > > On Mar 16, 8:45 pm, dany0212 <[email protected]> wrote: > > > > > Hello, > > > > > I am pretty new to Google Maps API v3. > > > > > I have been struggling to fix this issue in IE8 and IE7. > > > > The issue seems to be related to Overlays I added to color some > > > > countries on the map. > > > > I know v3 of Google maps does not support addOverlay() method which > > > > exists > > > > in v2. I used the example present on the site for v3 Google maps > > > > examples for OverlayView code to add my color overlays for countries. > > > > > Here is the code I am using to add > > > > Overlay:http://www.ez-datasolutions.com/maps/v3/js/overlays.js > > > > > I am calling it like this from my main page: > > > > > // create overlay > > > > var overlay = new Overlay(latlonBounds, image, map); > > > > > Here is my page:http://www.ez-datasolutions.com/maps/v3/map_example.html > > > > > When the page loads in IE8 or IE7 and I start moving the map around I > > > > get these errors. > > > > Here are the errors I am getting when viewing my page in IE8 or IE7: > > > > > Message: Invalid argument. > > > > Line: 65 > > > > Char: 3 > > > > Code: 0 > > > > URI:http://ez-datasolutions.com/maps/v3/js/overlays.js > > > > > I am not exactly sure why it would be throwing this error at that > > > > line. > > > > It does not do that in Firefox or Chrome. > > > > > Thanks a lot for your help. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
