# Changes in Behavior ## Content Security Policy To support running OpenLayers in places where [Content Security Policy](http://en.wikipedia.org/wiki/Content_Security_Policy) restrictions are in place (e.g. a browser extension), changes were made to the `OpenLayers.Symbolizer.prototype.clone` and `OpenLayers.Geometry.Collection.prototype.clone` methods. These methods previously used `eval` to create clones of the same type. They now instead use a new `OpenLayers.Util.getConstructor` method to get the appropriate constructor from an object's `CLASS_NAME` property. If your application extends OpenLayers types and you provide a `CLASS_NAME` outside the OpenLayers namespace, the `clone` methods will work unless you load your application script in a closure (e.g. an immediately-invoked function expression). In this case, you should override `OpenLayers.Util.getConstructor` to get your constructor from the `CLASS_NAME` property. ## GMaps v2 deprecation On Nov 19th 2013 Google deprecated GMaps version 2. This causes effects as can be seen here: http://www.flickr.com/photos/vtcraghead/10963760753/ More info on: http://googlegeodevelopers.blogspot.nl/2013/04/an-update-on-javascript-maps-api-v2.html `OpenLayers.Layer.Google` now uses v3 by default. v2 has been removed from the library. Please note that the layer types are different between v2 and v3, so if you were using e.g. `type: G_SATELLITE_MAP` you will now need to use `type: google.maps.MapTypeId.SATELLITE` instead. Also make sure you include the v3 version of the GMaps library, e.g.: `` ## More options in OpenLayers.Projection.defaults In addition to `maxExtent`, `units` and `xy`, projection defaults now include a `worldExtent` option. This is the extent of the world in geographic coordinates. For most projections, `[-180, -90, 180, 90]` will make sense. But for polar projections, it is recommended to use a world extent that excludes the invisible hemisphere. So for Northern polar projections, `[-180, 0, 180, 90]` would be a good setting. ## OpenLayers.Control.Graticule rewrite * The Graticule control has a `numPoints` option, which is now deprecated. The graticule lines are optimized with adaptive quantization instead. * The Graticul control now uses the projection specific maxExtent and worldExtent settings from `OpenLayers.Projection.defaults`. Make sure to create an `OpenLayers.Projection.defaults` entry for your projection when using a Graticule control. * The control's layer (`gratLayer`) now prefers the Canvas renderer. This avoids coordinate range issues with the SVG renderer. * Previously, meridians were only labelled at the bottom, and parallels at the right border of the map. To better support polar projections, meridians are now also labelled at the left border, and parallels at the top border, if they do not have an intersection point with the bottom or right border. * To avoid maps with missing or short grid lines, make sure you do not use a graticule when working with a projection outside of its validity extent or recommended viewing area. * To support date line wrapping, make sure you adjust the min and max longitude in the `worldExtent` setting for your projection in OpenLayers.Projection.defaults. For EPSG:4326, set it to `[-360, -90, 360, 90]`. By using -360 and 360 instead of -180 and 180, the longitudinal grid lines will always connect at the date line.