2015年6月10日水曜日

v3.6.0 がリリースされました

日本時間で(2015.6.7)に v3.6.0 がリリースされました。

Releases v3.6.0 - openlayers/ol3 GitHub
(https://github.com/openlayers/ol3/releases/tag/v3.6.0)より

v3.6.0

Summary

The 3.6.0 release includes features and fixes from 40 pull requests since 3.5.0. To simplify the code base, there were some changes to "experimental" features. Please follow the upgrade notes to make your applications work with the latest release.
3.6.0リリースは3.5.0以降の40のプルリクエスト(訳注:Git でリクエストを出す機能)からの機能と修正が含まれています。コードベースを簡素化するために、「実験的」な機能に変更があります。最新のリリースでアプリケーションを動作させるにはアップグレードの注意事項に従ってください。

Upgrade notes

ol.interaction.Draw changes

The minPointsPerRing config option has been renamed to minPoints. It is now also available for linestring drawing, not only for polygons.
minPointsPerRing 設定オプションは minPoints に名前が変更されました。現在、ポリゴンだけでなく、ラインストリングの描画にも利用可能です。

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.
ol.DrawEvent と DrawEventType タイプは ol.interaction.DrawEvent と ol.interaction.DrawEventType に名前が変更されました。これはコードが ol3 と一緒にコンパイルされている場合にのみ、コードに影響を与えます。

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.
ol.tilegrid.XYZ コンストラクタは、静的 ol.tilegrid.createXYZ()関数に置き換えられました。 ol.tilegrid.createXYZ()関数は、以前のol.tilegrid.XYZ コンストラクタと同じ引数を取りますが、ol.tilegrid.TileGrid インスタンスを返します。

The internal tile coordinate scheme for XYZ sources has been changed. Previously, the y of tile coordinates was transformed to the coordinates used by sources by calculating -y-1. Now, it is transformed by calculating height-y-1, where height is the number of rows of the tile grid at the zoom level of the tile coordinate.
XYZソースの内部タイル座標方式が変更されました。以前は、タイル座標 y が -y-1 を計算することによりソースによって使用される座標に変換されました。現在、高さがタイル座標のズームレベルのタイルグリッドの行の数の、高さ-y-1 で計算することによって変換されます。

The widths constructor option of ol.tilegrid.TileGrid and subclasses is no longer available, and it is no longer necessary to get proper wrapping at the 180° meridian. However, for ol.tilegrid.WMTS, there is a new option sizes, where each entry is an ol.Size with the width ('TileMatrixWidth' in WMTS capabilities) as first and the height ('TileMatrixHeight') as second entry of the array. For other tile grids, users can now specify an extent instead of widths. These settings are used to restrict the range of tiles that sources will request.
ol.tilegrid.TileGrid の幅コンストラクタオプションとサブクラスは使用できなくなり、180度子午線で適切な折り返しを取得する必要はなくなりました。しかし、ol.tilegrid.WMTS のために、各エントリが、配列の第1エントリとして幅(WMTS capabilities の 'TileMatrixWidth')と第2エントリとして高さ( 'TileMatrixHeight')を持つ ol.Size である新しいオプションのサイズがあります。他のタイルグリッドでは、ユーザは、現在、幅の替りに範囲を指定することができます。これらの設定は、ソースが要求するタイルの範囲を制限するために使用されます。

For ol.source.TileWMS, the default value of warpX used to be undefined, meaning that WMS requests with out-of-extent tile BBOXes would be sent. Now wrapX can only be true or false, and the new default is true. No application code changes should be required, but the resulting WMS requests for out-of-extent tiles will no longer use out-of-extent BBOXes, but ones that are shifted to real-world coordinates.
ol.source.TileWMS について、warpX のデフォルト値は、範囲外タイルBBOXesとともにWMS要求が送信されることを意味する、未定義にするために使用しました。現在、wrapX は true(真)または false(偽)だけとることができ、新しいデフォルトは true です。アプリケーション·コードの変更は必要ありませんが、必要がありますが、範囲外タイルのWMSリクエスト結果は、範囲外 BBOXes ではなく、実世界座標にシフトされたものを使用します。

(New features and fixes リストはサイトをみてください。)


v3.6.0 の examples を試してみます
OpenLayers 3 のホームページ(http://openlayers.org/)の「LATEST」の文中の「v3.6.0」をクリックします。
開いたページ「Downloads for the v3.6.0 release(http://openlayers.org/download/)」の「v3.6.0.zip」ボタンをクリックしてダウンロードします。
展開したフォルダを Eclipse の ol3proj にコピーします。

ディレクトリは次のようににしました。
ol3proj
|-v3.0.0/
|-v3.1.1/
|-v3.2.0/
|-v3.2.1/
|-v3.3.0/
|-v3.4.0/
|-v3.5.0/
|-v3.6.0/
|-2xx-ol3ex.html
|-2xx-ol3ex.js
|-2xx-ol3ex-require.js
|-loader.js
|-loader-v3.0.0.js
|-loader-v3.1.1.js
|-loader-v3.2.0.js
|-loader-v3.2.1.js
|-loader-v3.3.0.js
|-loader-v3.4.0.js

v.3.5.0 の loader.js の名前を loader-v3.5.0.js に変更し、v3.6.0/examples/loader.js を ol3proj 直下にコピーします。
ol3proj
|-v3.0.0/
|-v3.1.1/
|-v3.2.0/
|-v3.2.1/
|-v3.3.0/
|-v3.4.0/
|-v3.5.0/
|-v3.6.0/
|-2xx-ol3ex.html
|-2xx-ol3ex.js
|-2xx-ol3ex-require.js
|-loader.js
|-loader-v3.0.0.js
|-loader-v3.1.1.js
|-loader-v3.2.0.js
|-loader-v3.2.1.js
|-loader-v3.3.0.js
|-loader-v3.4.0.js
|-loader-v3.5.0.js

loader.js の内容を次のように修正します。

---
  if (!raw) {
    // document.write('<scr' + 'ipt type="text/javascript" src="../build/ol.js"></scr' + 'ipt>');
     // ディレクトリ修正
    document.write('<scr' + 'ipt type="text/javascript" src="v3.6.0/build/ol.js"></scr' + 'ipt>');

  } else {
    window.CLOSURE_NO_DEPS = true; // we've got our own deps file
    // document.write('<scr' + 'ipt type="text/javascript" src="../closure-library/closure/goog/base.js"></scr' + 'ipt>');
    // document.write('<scr' + 'ipt type="text/javascript" src="../build/ol-deps.js"></scr' + 'ipt>');
     // ディレクトリ修正
    document.write('<scr' + 'ipt type="text/javascript" src="v3.6.0/closure-library/closure/goog/base.js"></scr' + 'ipt>');
    document.write('<scr' + 'ipt type="text/javascript" src="v3.6.0/build/ol-deps.js"></scr' + 'ipt>');

    document.write('<scr' + 'ipt type="text/javascript" src="' + scriptId + '-require.js"></scr' + 'ipt>');
  }
  document.write('<scr' + 'ipt type="text/javascript" src="' + scriptId + '.js"></scr' + 'ipt>');
}());


以下の examples が復活しました
Mobile full screen example
Geolocation tracking with orientation example

0 件のコメント: