2017年11月28日火曜日

v4.5.0 がリリースされました

日本時間で(2017.11.13)に v4.5.0 がリリースされました。

Releases 4.5.0 - openlayers/openlayers GitHub
(https://github.com/openlayers/openlayers/releases/tag/v4.5.0)より

4.5.0
Summary

The 4.5 release includes enhancements and fixes from 50 or so pull requests. Headlining this release, vector layers got a new declutter option that can be used to avoid overlapping labels. See the street labels example for a demonstration of this feature.

4.5リリースには、50個程度のプルリクエストからの拡張と修正が含まれています。 このリリースの表題をつけると、ベクタレイヤは、重複するラベルを避けるために使用される新しい declutter オプションが追加されました。 この機能のデモンストレーションの street labels の例を参照してください。

Please note that if you are using closure-util to build your OpenLayers based application, it is time to migrate to using the ol package and a module bundler like webpack. OpenLayers has not had a dependency on the Closure Library since the 3.19 release; and with the 5.0 release we will be moving completely away from goog.require and goog.provide, dropping support for closure-util, and going with ES modules for our sources.

OpenLayers ベースのアプリケーションを構築するために closure-util を使用している場合は、ol パッケージと webpack のようなモジュールバンドラを使用するように移行する機会です。 OpenLayers は、3.19リリース以来 Closure Library に依存していませんでした。 5.0リリースでは、goog.require と goog.provide から完全に離れ、closure-util のサポートを廃止し、ソースにESモジュールを使用します。

We will be adding details to the wiki about upcoming changes in 5.0 and tips on how to upgrade. We'll likely have a few more 4.x releases before the 5.0 release. But if you're interested in continuing to get feature enhancements in future releases, migrating to the ol package now will make the transition easier.

今後の5.0の変更点やアップグレード方法のヒントについては、wikiに詳細を追加します。 おそらく5.0リリースの前に4.xのリリースがいくつかあります。 しかし、将来のリリースで機能強化を継続したい場合は、今すぐ ol パッケージに移行することで簡単に(将来のリリースに)移行できます。

Upgrade notes

Removed GeoJSON crs workaround for GeoServer
GeoServer の GeoJSON crs 回避策を削除

Previous version of GeoServer returned invalid crs in GeoJSON output. The workaround in ol.format.GeoJSON used to read this crs code is now removed.

GeoServer の以前のバージョンでは、GeoJSON 出力に無効な crs が返されました。 この crs コードの読み取りに使用された ol.format.GeoJSON の回避策が削除されました。


Deprecation of ol.Attribution
ol.Attribution の非推奨

ol.Attribution is deprecated and will be removed in the next major version. Instead, you can construct a source with a string attribution or an array of strings. For dynamic attributions, you can provide a function that gets called with the current frame state.

ol.Attribution は非推奨とされ、次のメジャーバージョンで削除されます。 その代わりに、文字列属性または文字列の配列を使用してソースを構築することができます。 動的属性の場合、現在のフレーム状態で呼び出される関数を提供できます。

Before:
var source = new ol.source.XYZ({
 attributions: [
  new ol.Attribution({html: 'some attribution'})
 ]
});
After:
var source = new ol.source.XYZ({
 attributions: 'some attribution'
});
In addition to passing a string or an array of strings for the attributions option, you can also pass a function that will get called with the current frame state.

attributionsオプションに文字列または文字列の配列を渡すことに加え、現在のフレーム状態で呼び出される関数を渡すこともできます。
var source = new ol.source.XYZ({
 attributions: function(frameState) {
  // inspect the frame state and return attributions
  return 'some attribution'; // or ['multiple', 'attributions'] or null
 }
});

(Detailed Changes リストはサイトをみてください。)


OpenLayers のダウンロード
OpenLayers のホームページ(http://openlayers.org/)の「LATEST」の文中の「v4.5.0」をクリックします。


開いたページ「Downloads for the v4.5.0 release(http://openlayers.org/download/)」の「v4.5.0.zip」をクリックしてダウンロードします。


■参考■
「The ol package」と「Hosted builds for development」には、次のようなことが記載されています。

The ol package

The recommended way to use OpenLayers is to work with the ol package. You can install the latest with npm:

OpenLayers を使用する推奨方法は、ol パッケージで作業することです。npm で最新版をインストールできます:

npm install ol


Hosted builds for development

If you want to try out OpenLayers without downloading anything, a full build of each release which can be used in a script tag is available from cdnjs. You will need both the JS build and the CSS files; see the examples or the Quickstart tutorial for usage. Note that you should not use a full build in production, instead you are encouraged to use the ol package described above.

ダウンロードしないで OpenLayers を試したい場合は、スクリプトタグで使用できる各リリースのフルビルドを cdnjs から入手できます。 JSビルドファイルとCSSファイルの両方が必要になります。 使用例については、examples または Quickstart tutorial を参照してください。 本番環境では完全ビルドを使用しないでください。代わりに、上記の ol パッケージを使用することをお勧めします。
■ここまで■

次のようなダイアログが表示されたら「ファイルを保存する」のラジオボタンがオンになっていることを確認して「OK」ボタンをクリックします。



このファイルを解凍します。

user@deb9-vmw:~$ cd ダウンロード
user@deb9-vmw:~/ダウンロード$ ls
---
v4.5.0.zip
---
user@deb9-vmw:~/ダウンロード$ unzip v4.5.0.zip
user@deb9-vmw:~/ダウンロード$ ls
---
v4.5.0
v4.5.0.zip
---

ol4proj フォルダに、解凍した v4.5.0 フォルダを eclipse にインポートします。
eclipse を起動します。

user@deb9-vmw:~/ダウンロード$ cd
user@deb9-vmw:~$ eclipse

起動の途中で「ワークスペースの選択」ウィンドウが表示されます。
「参照」ボタンをクリックして /home/user/public_html/eclipse-workspace でとりあえず「OK」をクリックします。(Web ブラウザで表示しやすくするため eclipse-workspace を /home/user/public_html に移動しました。)


メニューの ファイル -> インポート をクリックします。











「インポート」ダイアログの「選択」の「インポート・ウィザードの選択(S):」で、一般 -> ファイル・システム をクリックして選択し、「次へ」ボタンをクリックします。







「インポート」ダイアログの「ファイル・システム」の「次のディレクトリから(Y):」欄の右側の「参照(R)」ボタンをクリックします。







「ディレクトリーからインポート」ダイアログで左側の「ホーム」をクリックして、表示された「名前」欄の「ダウンロード」をクリックして選択し、「OK」ボタンをクリックします。





「インポート」ダイアログの「ファイル・システム」の「ダウンロード」の左側の三角形をクリックして「ダウンロード」以下の一覧を表示し、「v4.5.0」をクリックして選択します。





「インポート」ダイアログの「ファイル・システム」の「宛先フォルダー(L):」欄の右側の「参照(W)」ボタンをクリックします。



「フォルダーにインポート」ダイアログで「ol4proj」をクリックして選択し、「OK」ボタンをクリックします。











「インポート」ダイアログの「ファイル・システム」の「完了(F)」ボタンをクリックします。




検証(時間がかかることがあります)が終わったあと「プロジェクタ・エクスプローラー」ビューの「ol4proj」左側の▽をクリックして、「v4.5.0」を表示します。
「v4.5.0」左側の▽をクリックすると中身が表示されます。

追加された Examples を試してみます。

0 件のコメント: