openlayers/openlayers — pull request #545 by probins (2012-06-25 10:31:48+00:00)
Title: Replace eval in Geometry.Collection.clone()

Apart from being evil, this eval won't work in the situation where the OpenLayers var is wrapped in an AMD define function and then run through the closure compiler; the compiler will change 'OpenLayers' to 'c' or something.

This simple fix should work with all geometry types, as the class names are all OpenLayers.Geometry.xxx, and the clone tests continue to pass.

There's a similar issue with Symbolizer.clone() which also uses an eval. However, to fix this would require more fiddling around to cater for class-names of both OpenLayers.Symbolizer and OpenLayers.Symbolizer.xxx. As I don't use Symbolizer, that's not a priority for me.