I have a web application based on RichFaces 3.3.3 that uses Google Maps (maps-api v3), that was working fine until recently.
Lately is failing to draw the map\'s use
This function at line number 629ish in prototype.js is causing the exception. Simply add try catch blocks as shown below. It works with any Google Maps API.
collect: function(iterator, context) {
iterator = iterator ? iterator.bind(context) : Prototype.K;
var results = [];
try {
this.each(function(value, index) {
results.push(iterator(value, index));
});
} catch (err) {}
return results;
}
Change to version v3, the conflict with prototype will disappear, I have tried in my site, it works fine.
Yes!! the solution for me was change the line from:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false" />
to
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&v=3" />
Thanks!!
I had the same problem this morning. Got the same error, controls like the zoom control would not render. I upgraded my prototype.js to the latest version (1.7.2) from version (1.7) and things worked again. Am using google maps api V3, the production version. Don't know if it was the newer version prototype.js or if Google changed something and then fixed something, but it's happy now.