Search code examples
google-mapsgoogle-maps-api-3prototypejs

Google Maps JavaScript StreetView bug


The newest release version of the Google Maps JavaScript (3.32.13) is conflicting with Prototype.js version 1.7.3.

When I have Prototype included on the page, the Street View of Google Maps will not handle mouse drags to "look around"

Is this a known issue? Any workarounds?


Solution

  • So the problem is that PrototypeJS is overwriting Array.from as an alias to $A() which creates an extended Array object.

    IF (big IF) you are not using Array.from to create a shallow copy of an array and expecting the Prototype extended methods, you can remove/comment out the line in prototype.js that is only

    Array.from = $A;
    

    In my copy of 1.7.3 it is line 1114