| Version 2 (modified by euzuro, 7 years ago) |
|---|
OpenLayers 2.2 Release Notes
- Milestone: 2.2 Release
- Closed Tickets: TRAC Query
Table of Contents
General
- Script-adding is now XHTML Compliant (#177) -- Thanks Steve Pomeroy!
- Single file build no longer produces bogus paths to control pngs (#259)
- OpenLayers Lite factored out as an independent build target (#323)
- Removal of Prototype Library (r1588)
- Object.extend() becomes OpenLayers.Util.extend()
- Try.these() becomes OpenLayers.Util.Try()
- Position.page() becomes OpenLayers.Util.pagePosition()
- Ajax becomes OpenLayers.Ajax
- Element becomes OpenLayers.Element
- Event becomes OpenLayers.Event
- Improvement of class definition vs instantiation (#75)
old syntax:
OpenLayers.A = Class.create(); OpenLayers.A.prototype = Object.extent( new OpenLayers.X(), Object.extent( new OpenLayers.Y(), { //prototype goes here }));new syntax:OpenLayers.A = OpenLayers.Class.create(); OpenLayers.A.prototype = OpenLayers.Class.inherit( OpenLayers.X, OpenLayers.Y, { //prototype goes here });Besides simply being more readable and understandable, the main benefit of this new enhancement (see r1647 for details) is that it removes the extraneous calls to classes' initialize() method during class definitions. This means no more do you need to testif (arguments.length > 0)
inside a superclass's constructor before doing instance-specific work, because it will only be called on instantiation of a new class.
Map
- Map now gracefully deals with setCenter() to out-of maxExtent coord (#191)
- Selection of Map Tiles is Prevented (#272) -- Thanks Sean Gillies!
- Fixed obscure page-scrolling map display bug (#333)
- Switching BaseLayers
Layers
- Scales and Resolutions
- Preset scales[] and resolutions[] arrays are Automatically Sorted (#190)
- When a cloned layer is added to a map, it re-initializes its resolutions information based on new map div's characteristics. (#328)
- Scale-dependent layer visibility (#99)
All overlays now test to make sure that the current map's resolution (or scale) falls in between their minResolution and maxResolution* values. If it does not, then the layer is hidden and greyed out in the LayerSwitcher.
*For a refresher on how resolution values are calculated, see SettingZoomLevels
- Layers can be Raised/Lowered Programmatically (#105)
New map functions
getNumLayers() getLayerIndex() setLayerIndex() raiseLayer()
to support raising and lowering layers in vertical map space. (see r1604)
- Grid
- Tiles now round bbox values to six decimal digits (#283)
- Tiles outside maxExtent can be set to not render (#284)
- WFS
- WFS Layers now work in Firefox, IE, Safari. (#138)
- WMS
- WMS layers can now be reprojected onto different base layers (#196)
Now you can more accurately overlay WMS layers onto Google, VE, or any other baselayer.
See it here: examples/google.html
- WMS layers can now be reprojected onto different base layers (#196)
- Untiled
- Commercial Layers
- Massive refactoring of FixedZoomLevels layers (Google, Yahoo, VE, etc) (#342)
- Google
- Allow click-through to Google Terms of Use Link (#185)
- Virtual Earth
- Created Mapserver CGI Layer (#175) -- Thanks Arnd Wipperman!
Popups
- Gave the popup a content area, padding, and an optional close box (#330)
Controls
- Created MousePosition Control (#329) -- Thanks Jeff Dege!
Simple but elegant control that displays the current lon/lat coords of the mouse cursor
See it here: examples/controls.html
- Created OverviewMap Control (#104) -- Thanks Tim Schaub!
We now have a control for an overview map that hangs out in the lower-righthand corner of the map.
See it here: examples/controls.html - Created ArgParser Control (#148)
Instead of having Permalink deal with pulling parameters from the location bar's query string, we now have a new control that is dedicated to doing this. ArgParser is one of the DefaultControls, so you can initialize any openlayers map by setting the lon and lat and/or zoom parameters in the query string.
Ex: http://www.openlayers.org/dev/examples/controls.html?lat=-12.91952&lon=-38.60199&zoom=10 - Permalink
- Permalink can now be added to the map before a BaseLayer (#217)
- As mentioned above, Permalink no longer is responsible for reading in query parameters -- that is delegated to ArgParser. (#148)
- If the Permalink control is added to the map which has no ArgParser, it takes care to add one itself. (#148)
- Now besides storing lon, lat, and zoom for a map, the Permalink control also stores a record of which layers were visible. (#148)
Ex: http://www.openlayers.org/dev/examples/controls.html?lat=-13.08191&lon=-38.73143&zoom=12&layers=0BF
- LayerSwitcher
- Removed old LayerSwitcher control from trunk (#200)
- Added ability to render Layers Tob-to-Bottom or Bottom-to-Top (#256)
- Gave Layers a flag variable that allows them to not be rendered in the LayerSwitcher (#274)
