Move upgrade notes to 3.7 and fix typos
This commit is contained in:
@@ -93,6 +93,10 @@ var tileUrlFunction = function(tileCoord, pixelRatio, projection) {
|
|||||||
|
|
||||||
The replacement of `ol.tilegrid.Zoomify` is a plain `ol.tilegrid.TileGrid`, configured with `extent`, `origin` and `resolutions`. If the `size` passed to the `ol.source.Zoomify` source is `[width, height]`, then the extent for the tile grid will be `[0, -height, width, 0]`, and the origin will be `[0, 0]`.
|
The replacement of `ol.tilegrid.Zoomify` is a plain `ol.tilegrid.TileGrid`, configured with `extent`, `origin` and `resolutions`. If the `size` passed to the `ol.source.Zoomify` source is `[width, height]`, then the extent for the tile grid will be `[0, -height, width, 0]`, and the origin will be `[0, 0]`.
|
||||||
|
|
||||||
|
#### Replace `ol.View.fitExtent()` and `ol.View.fitGeometry()` with `ol.View.fit()`
|
||||||
|
* This combines two previously distinct functions into one more flexible call which takes either a geometry or an extent.
|
||||||
|
* Rename all calls to `fitExtent` and `fitGeometry` to `fit`.
|
||||||
|
|
||||||
### v3.6.0
|
### v3.6.0
|
||||||
|
|
||||||
#### `ol.interaction.Draw` changes
|
#### `ol.interaction.Draw` changes
|
||||||
@@ -100,10 +104,6 @@ The replacement of `ol.tilegrid.Zoomify` is a plain `ol.tilegrid.TileGrid`, conf
|
|||||||
* The `minPointsPerRing` config option has been renamed to `minPoints`. It is now also available for linestring drawing, not only for polygons.
|
* The `minPointsPerRing` config option has been renamed to `minPoints`. It is now also available for linestring drawing, not only for polygons.
|
||||||
* The `ol.DrawEvent` and `ol.DrawEventType` types were renamed to `ol.interaction.DrawEvent` and `ol.interaction.DrawEventType`. This has an impact on your code only if your code is compiled together with ol3.
|
* The `ol.DrawEvent` and `ol.DrawEventType` types were renamed to `ol.interaction.DrawEvent` and `ol.interaction.DrawEventType`. This has an impact on your code only if your code is compiled together with ol3.
|
||||||
|
|
||||||
#### Replace `ol.View.fitExtent()` and `ol.View.fitGeometry()` with `ol.View.fit()`
|
|
||||||
* This combines two previously distinct functions into one more flexible call which takes either a geometry or an extent.
|
|
||||||
* Rename all calls to `fitExtent` and `fitGeometry` to `fit`.
|
|
||||||
|
|
||||||
#### `ol.tilegrid` changes
|
#### `ol.tilegrid` changes
|
||||||
|
|
||||||
* The `ol.tilegrid.XYZ` constructor has been replaced by a static `ol.tilegrid.createXYZ()` function. The `ol.tilegrid.createXYZ()` function takes the same arguments as the previous `ol.tilegrid.XYZ` constructor, but returns an `ol.tilegrid.TileGrid` instance.
|
* The `ol.tilegrid.XYZ` constructor has been replaced by a static `ol.tilegrid.createXYZ()` function. The `ol.tilegrid.createXYZ()` function takes the same arguments as the previous `ol.tilegrid.XYZ` constructor, but returns an `ol.tilegrid.TileGrid` instance.
|
||||||
|
|||||||
+2
-2
@@ -436,9 +436,9 @@ ol.View.prototype.getZoom = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fit the given geometry or extent based on the given map size and border.
|
* Fit the given geometry or extent based on the given map size and border.
|
||||||
* The size is pixel deminsions of the box to fit the extent into.
|
* The size is pixel dimensions of the box to fit the extent into.
|
||||||
* In most cases you will want to use the map size, that is `map.getSize()`.
|
* In most cases you will want to use the map size, that is `map.getSize()`.
|
||||||
* Take care on the map angle.
|
* Takes care of the map angle.
|
||||||
* @param {ol.geom.SimpleGeometry|ol.Extent} geometry Geometry.
|
* @param {ol.geom.SimpleGeometry|ol.Extent} geometry Geometry.
|
||||||
* @param {ol.Size} size Box pixel size.
|
* @param {ol.Size} size Box pixel size.
|
||||||
* @param {olx.view.FitOptions=} opt_options Options.
|
* @param {olx.view.FitOptions=} opt_options Options.
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ describe('ol.View', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('#calculateExtent', function() {
|
describe('#calculateExtent', function() {
|
||||||
it('returns the expect extent', function() {
|
it('returns the expected extent', function() {
|
||||||
var view = new ol.View({
|
var view = new ol.View({
|
||||||
resolutions: [512],
|
resolutions: [512],
|
||||||
zoom: 0,
|
zoom: 0,
|
||||||
@@ -400,7 +400,7 @@ describe('ol.View', function() {
|
|||||||
resolutions: [200, 100, 50, 20, 10, 5, 2, 1]
|
resolutions: [200, 100, 50, 20, 10, 5, 2, 1]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('fit correctly to the geometry', function() {
|
it('fits correctly to the geometry', function() {
|
||||||
view.fit(
|
view.fit(
|
||||||
new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]),
|
new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]),
|
||||||
[200, 200],
|
[200, 200],
|
||||||
|
|||||||
Reference in New Issue
Block a user