ラベル KML の投稿を表示しています。 すべての投稿を表示
ラベル KML の投稿を表示しています。 すべての投稿を表示

2015年10月27日火曜日

OL3-Cesium19 14 - ol3cesium kml example 2

14-2 JavaScript ファイルの作成
「kml.js(14-ol3cesium19.js)」は、マップを表示するための JavaScript ファイルです。

OL3-Cesium API は、現在、すべて実験的(experimental)なものです。

「14-ol3cesium19.js」
var ol2d = new ol.Map({
 layers: [
  new ol.layer.Tile({
  /** ol.layer.Tile 
   * For layer sources that provide pre-rendered, tiled 
   * images in grids that are organized by zoom levels for 
   * specific resolutions. 
   * プリレンダリング(事前描画)を提供するレイヤソースのための、
   * 特定の解像度でのズームレベルによって編成されているグリッドの
   * タイルイメージ。(ol3 API)
   */
   source: new ol.source.OSM()
   /** ol.source.OSM 
    * Layer source for the OpenStreetMap tile server.
    * OpenStreetMap タイルサーバのレイヤソース。(ol3 API)
    */
  })
 ],
 controls: ol.control.defaults({
 /** controls
  * Controls initially added to the map. 
  * If not specified, ol.control.defaults() is used.
  * 初期設定で、マップに追加されたコントロール。
  * 明示されていなければ、ol.control.defaults() が使用されます。
  * (ol3 API)
  */
 /** ol.control.defaults()
  * デフォルトでは、マップに含まコントロールのセット。
  * 特に設定しない限り、これは、以下の各コントロールの
  * インスタンスを含むコレクションを返します。(ol3 API)
  * ol.control.Zoom, ol.control.Rotate, ol.control.Attribution
  */
  attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
  /** @type 
   * 値のタイプ(型)の説明 - 式などで表示
   * (@use JSDoc[http://usejsdoc.org/]より)
   */
   collapsible: false // 折りたたみ
  })
 }),
 target: 'map',
 view: new ol.View({
  // スイス国内の kml データなので初期表示の中心を修正。
  // center: ol.proj.transform([25, 20], 'EPSG:4326', 'EPSG:3857'),
  center: ol.proj.transform([9, 47], 'EPSG:4326', 'EPSG:3857'),
  /** ol.proj.transform(coordinate, source, destination)
   * Transforms a coordinate from source projection to 
   * destination projection. This returns a new coordinate 
   * (and does not modify the original).
   * ソース投影から変換先投影に座標変換します。これは、新しい座標
   * を返します(オリジナルを変更しません)。(ol3 API)
   */
  // kml データの表示に時間がかかるので初期表示範囲を修正。
  // zoom: 3
  zoom: 12
 })
});
var ol3d = new olcs.OLCesium({map: ol2d});
/** new olcs.OLCesium(options)
 * map: The OpenLayers map we want to show on a Cesium scene.
 * Cesium シーンで表示したい OpenLayers マップ。
 * (OL3-Cesium API)
 */
var scene = ol3d.getCesiumScene();
/** getCesiumScene()
 * (OL3-Cesium API に説明がありませんでした。)
 */
var terrainProvider = new Cesium.CesiumTerrainProvider({
/** new CesiumTerrainProvider(options)
 * A TerrainProvider that access terrain data in a Cesium 
 * terrain format. The format is described on the Cesium 
 * wiki. 
 * セシウム地形(Cesium terrain)フォーマットの地形(terrain)
 * データにアクセスする TerrainProvider。フォーマットは、セシウ
 * ムウィキに記載されています。
 * (Cesium refdoc)
 */
 url : '//assets.agi.com/stk-terrain/world'
 /** url
  * The URL of the Cesium terrain server.
  * セシウム地形(Cesium terrain)サーバの URL。
  * (Cesium refdoc)
  */
});
scene.terrainProvider = terrainProvider;
ol3d.getDataSources().add(Cesium.KmlDataSource.load(
/** getDataSources(){Cesium.DataSourceCollection}
 * (OL3-Cesium API に説明がありませんでした。)
 */
/** KmlDataSource.load(data, options) -> Promise.
 * Creates a Promise to a new instance loaded with the 
 * provided KML data.
 * Promise を、提供された KML データと共に、挿入された新しいイン
 * スタンスに作成します。(Cesium refdoc)
 */
 'https://api3.geo.admin.ch/ogcproxy?url=' +
 'https%3A%2F%2Fdav0.bgdi.admin.ch%2Fbazl_web%2FActive_Obstacles.kmz'
));
Chromium では表示できないので、Iceweasel(Firefox)のアドレスバーに

http://localhost/~user/ol3cesiumproj/public_html/14-ol3cesium19.html

と入力して表示します。

OL3-Cesium1.9 14 - ol3cesium kml example 1

OL3-Cesium Examples
http://openlayers.org/ol3-cesium/examples/

の例をみていきます。

14 - ol3cesium kml example
「ol3cesium kml example (kml.html)」を参考に地図を表示してみます。

14-1 HTML ファイルの作成
1 NetBeans を起動します。









2 「プロジェクト」ペインでツリーを ol3cesiumproj -> サイト・ルート -> js -> libs -> ol3-cesium-v1.9 -> examples とクリックして展開し kml.html をダブルクリックして開きます。kml.js もダブルクリックして開きます。



3 「新規ファイル」ボタンをクリックします。

4 ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「HTMLファイル」を選択して「次>」ボタンをクリックします。






5 「new HTML ファイル」ダイアログで「ファイル名」を「13-ol3cesium18」と入力して「終了」ボタンをクリックします。







保存フォルダを変更するときは、「フォルダ」右の「参照」ボタンをクリックして「フォルダを参照」で「ol3cesiumproj-サイト・ルート」をクリックして選択し「フォルダを選択」ボタンをクリックします。









6 「kml.html」の内容をコピーして「14-ol3cesium19.html」に貼り付け、修正します。

7 同じように、「新規ファイル」ボタンをクリックし、ステップ「1.ファイル・タイプを選択」の「カテゴリ」で「HTML5」、「ファイルタイプ」で「JavaScriptファイル」をクリックして選択し「次>」ボタンをクリック。「ファイル名」を「14-ol3cesium19」と入力して「終了」ボタンをクリック。「kml.js」の内容をコピーして貼り付け、修正します。



「index.html」
<html>
 <head>
  <title>TODO supply a title</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body>
  <div>TODO write content</div>
  <div><a href="./3-ol3cesium17.html">3-ol3cesium17.html</a></div>
  <div><a href="./4-ol3cesium17.html">4-ol3cesium17.html</a></div>
  <div><a href="./5-ol3cesium17.html">5-ol3cesium17.html</a></div>
  <div><a href="./6-ol3cesium17.html">6-ol3cesium17.html</a></div>
  <div><a href="./7-ol3cesium17.html">7-ol3cesium17.html</a></div>
  <div><a href="./8-ol3cesium17.html">8-ol3cesium17.html</a></div>
  <div><a href="./9-ol3cesium17.html">9-ol3cesium17.html</a></div>
  <div><a href="./10-ol3cesium17.html">10-ol3cesium17.html</a></div>
  <div><a href="./11-ol3cesium17.html">11-ol3cesium17.html</a></div>
  <div><a href="./12-ol3cesium17.html">12-ol3cesium17.html</a></div>
  <div><a href="./13-ol3cesium18.html">13-ol3cesium18.html</a></div>
  <div><a href="./14-ol3cesium19.html">14-ol3cesium19.html</a></div>
 </body>
</html>


「14-ol3cesium19.html」
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, all" />
  <title>ol3cesium kml example</title>
  <!-- ディレクトリ修正
  <link rel="stylesheet" href="../ol3/css/ol.css" type="text/css">
  -->
  <link rel="stylesheet" href="./js/libs/ol3-cesium-v1.9/ol3/css/ol.css" type="text/css">
 </head>
 <body>
  <div id="map" style="width:600px;height:400px;"></div>
  <input type="button" value="Enable/disable" onclick="javascript:ol3d.setEnabled(!ol3d.getEnabled())" />
  <!-- ディレクトリ修正
  <script src="../ol3/ol-debug.js"></script>
  <script src="../Cesium/Cesium.js"></script>
  <script src="../ol3cesium.js"></script>
  -->
  <script src="./js/libs/ol3-cesium-v1.9/ol3/ol-debug.js"></script>
  <script src="./js/libs/ol3-cesium-v1.9/Cesium/Cesium.js"></script>
  <script src="./js/libs/ol3-cesium-v1.9/ol3cesium.js"></script>
  <!-- <script src="kml.js"></script> -->
  <script src="14-ol3cesium19.js"></script>
 </body>
</html>

2014年11月30日日曜日

2 - ol3ex 34b - Earthquakes heatmap 2

「heatmap-earthquakes.js(234-ol3ex.js)」は、マップを表示するための JavaScript ファイルです。
2012_Earthquakes_Mag5.kml の内容は、次のようになっています。
「2012_Earthquakes_Mag5.kml」
⁢<?xml version="1.0" encoding="UTF-8"?>
⁢<kml xmlns="http://earth.google.com/kml/2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <⁢Document>
  ⁢<name>2012 Earthquakes, Magnitude 5⁢</name>
   <atom:author>
    ⁢<atom:name>U.S. Geological Survey<⁢/atom:name>
   ⁢</atom:author>
   <⁢atom:link href="http://earthquake.usgs.gov" />
   <⁢Folder>
    <name>Magnitude 5<⁢/name>
    ⁢<Placemark id="2012 Jan 15 13:40:16.40 UTC">
     ⁢<name>M 5.9 - 2012 Jan 15, SOUTH SHETLAND ISLANDS<⁢</name>
     ⁢<magnitude>5.9⁢</magnitude>
     ⁢<Point>
      ⁢<coordinates>-56.072,-60.975,0⁢</coordinates>
     <⁢/Point>
    <⁢/Placemark>
    <⁢Placemark id="2012 Jan 19 06:48:48.75 UTC">
---

「234-ol3ex.js」
var vector = new ol.layer.Heatmap({
/** ol.layer.Heatmap
 * Layer for rendering vector data as a heatmap. 
 * Note that any property set in the options is set 
 * as a ol.Object property on the layer object; 
 * for example, setting title: 'My Title' in the options 
 * means that title is observable, and has get/set accessors.
 * ヒートマップとしてベクトルデータをレンダリングするためのレイ
 * ヤ。オプションで設定したすべてのプロパティは、レイヤオブジェ
 * クトで ol.Object プロパティとして設定されていることに注意し
 * てください。たとえば、オプションでタイトル「My Title」を設
 * 定することは、タイトルが識別され、アクセサ(アクス機構)を得
 * るまたは設定することを意味します。(0l3 API)
 */
 source: new ol.source.KML({
 /** ol.source.KML 
  * Static vector source in KML format
  * KML フォーマットの静的ベクタソース(0l3 API)
  */
  extractStyles: false,
  projection: 'EPSG:3857',
  // url: 'data/kml/2012_Earthquakes_Mag5.kml'
  url: 'v3.0.0/examples/data/kml/2012_Earthquakes_Mag5.kml'
  // 修正
 }),
 radius: 5
});
vector.getSource().on('addfeature', function(event) {
/** 2012_Earthquakes_Mag5.kml stores the magnitude of each 
 * earthquake in a standards-violating <magnitude> 
 * tag in each Placemark.  We extract it from the 
 * Placemark's name instead.
 * 2012_Earthquakes_Mag5.kml は、それぞれの Placemark に標準
 * 規格に違反する <magnitude> タグに各地震のマグニチュードを
 * 格納します。私たちは、代わりに Placemark 名からそれを抽出しま
 * す。
 */
/** getSource()
 * Return: Source(al3 API)
 */
/** on()
 * Listen for a certain type of event.
 * あるイベントの型をリッスンします。(al3 API)
 */
 var name = event.feature.get('name');
 /** event
  * Instance of an Event that is available to an event 
  * handler.
  * イベントハンドラで使用できるイベントのインスタンス。
  */
  /** get(key)
  * Gets a value.
  * (ol3 API[説明は Stable Only のチェックを外すと表示])
  */
 var magnitude = parseFloat(name.substr(2));
 /** parseFloat()
  * 引数として与えられた文字列を解析し、浮動小数点数を返します。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/parseFloat])
  */ 
 /** String.prototype.substr()
  * The substr() method returns the characters in a 
  * string beginning at the specified location 
  * through the specified number of characters.
  * substr()メソッドは、文字列内の指定した位置から始まり、
  * 指定した文字数のまでの文字を返します。
  * (MDN[https://developer.mozilla.org/en-US/docs/Web/
  * JavaScript/Reference/Global_Objects/String/substr])
  */
 event.feature.set('weight', magnitude - 5);
 /** set(key, value)
  * Sets a value.
  * (ol3 API[説明は Stable Only のチェックを外すと表示])
  */
});
var raster = new ol.layer.Tile({
/** ol.layer.Tile 
 * For layer sources that provide pre-rendered, tiled 
 * images in grids that are organized by zoom levels for 
 * specific resolutions. 
 * プリレンダリング(事前描画)を提供するレイヤソースのための、
 * 特定の解像度でのズームレベルによって編成されているグリッドの
 * タイルイメージ。(ol3 API)
 */
 source: new ol.source.Stamen({
 /** ol.source.Stamen
  * Layer source for the Stamen tile server.
  * Stamen タイルサーバのレイヤソース。(ol3 API)
  * (2 - ol3ex 24b - Stamen example 2 参照)
  */
  layer: 'toner'
 })
});
var map = new ol.Map({
 layers: [raster, vector],
 target: 'map',
 view: new ol.View({
  center: [0, 0],
  zoom: 2
 })
});


2 - ol3ex 34a - Earthquakes heatmap 1

「Earthquakes heatmap(heatmap-earthquakes.html)」を参考に地図を表示してみます。

HTML ファイルの作成
a Eclipse のメニューの「ファイル」->「ファイルを開く」をクリックします。





b 「ファイルを開く」ウィンドウで、「user」->「mapsite」->「ol3proj」->「v3.0.0」->「examples」->「heatmap-earthquakes.html」をクリックして選択し、「OK」ボタンをクリックします。
同じように「heatmap-earthquakes.js」を開きます。





c メニューの「ファイル」->「新規」 -> 「ファイル」をクリックします。



d 「ファイル」ウィンドウで「ol3proj」をクリックして選択し、「ファイル名」を「234-ol3ex.html」と入力し、「次へ」ボタンをクリックします。








e 「File Template」ウィンドウで「HTML 5 Template」をクリックして選択し、「OK」ボタンをクリックします。











f 「heatmap-earthquakes.html」の内容をコピーして「234-ol3ex.html」に貼り付け、修正します。
g 同じように、新規に「234-ol3ex.js」ファイルを作成し、「File Template」ウィンドウで「JavaScript Template」をクリックして選択し、「完了」ボタンをクリックして、「heatmap-earthquakes.js」の内容をコピーして貼り付け、修正します。「heatmap-earthquakes-require.js」も「234-ol3ex-require.js」に貼り付けます。


「234-ol3ex.html」
<!doctype html>
<html lang="en">
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<!--
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="../resources/layout.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
-->
  <!-- ディレクトリ修正 -->
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/layout.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
  <title>Earthquakes heatmap</title>
 </head>
 <body>
  <!-- 
  bootstrap.min.css, bootstrap-responsive.min.css で設定されたセレクタを使用。
  -->
  <div class="navbar navbar-inverse navbar-fixed-top">
   <div class="navbar-inner">
    <div class="container">
<!--
     <a class="brand" href="./"><img src="../resources/logo.png"> OpenLayers 3 Examples</a>
-->
      <!-- ディレクトリ修正 -->
     <a class="brand" href="v3.0.0/examples/"><img src="v3.0.0/resources/logo.png"> OpenLayers 3 Examples</a>
    </div>
   </div>
  </div>
  <div class="container-fluid">
   <div class="row-fluid">
    <div class="span12">
     <div id="map" class="map"><div id="info"></div></div>
    </div>
   </div>
   <div class="row-fluid">
    <div class="span12">
     <h4 id="title">Earthquakes heatmap</h4>
     <p id="shortdesc">Demonstrates the use of a heatmap layer.</p>
     <div id="docs">
      <p>This example parses a KML file and renders the features as a <code>ol.layer.Heatmap</code> a layer.</p>
<!--
      <p>See the <a href="heatmap-earthquakes.js" target="_blank">heatmap-earthquakes.js source</a> to see how this is done.</p>
-->
       <!-- ファイル修正 -->
      <p>See the <a href="234-ol3ex.js" target="_blank">234-ol3ex.js source</a> to see how this is done.</p>
     </div>
     <div id="tags">heatmap, kml, vector, style</div>
    </div>
   </div>
  </div>
<!--
  <script src="jquery.min.js" type="text/javascript"></script>
  <script src="../resources/example-behaviour.js" type="text/javascript"></script>
-->
  <!-- ディレクトリ修正
   jQuery Minified版と
   example-behaviour.js(Examples用 JSコード[文字コードなど])
  -->
  <script src="v3.0.0/examples/jquery.min.js" type="text/javascript"></script>
  <script src="v3.0.0/resources/example-behaviour.js" type="text/javascript"></script>
<!--
  <script src="loader.js?id=heatmap-earthquakes" type="text/javascript"></script>
-->
  <!-- ファイル修正 -->  <!-- ディレクトリ修正 -->
  <script src="loader.js?id=234-ol3ex" type="text/javascript"></script>

 </body>
</html>

2 - ol3ex 33b - Earthquakes in KML 2

「kml-earthquakes.js(233-ol3ex.js)」は、マップを表示するための JavaScript ファイルです。
2012_Earthquakes_Mag5.kml の内容は、次のようになっています。
「2012_Earthquakes_Mag5.kml」
<⁢⁢?xml version="1.0" encoding="UTF-8"?>
<⁢⁢kml xmlns="http://earth.google.com/kml/2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <⁢⁢⁢⁢Document>
  ⁢⁢<⁢⁢name>2012 Earthquakes, Magnitude 5⁢⁢<⁢⁢/name>
   ⁢⁢<⁢⁢atom:author>
    ⁢⁢<⁢⁢atom:name>U.S. Geological Survey<⁢⁢⁢⁢/atom:name>
   ⁢⁢<⁢⁢/atom:author>
   <⁢⁢⁢⁢atom:link href="http://earthquake.usgs.gov"/>
   <⁢⁢⁢⁢Folder>
    ⁢⁢<⁢⁢name>Magnitude 5⁢⁢<⁢⁢/name>
    ⁢⁢<⁢⁢Placemark id="2012 Jan 15 13:40:16.40 UTC">
     ⁢⁢<⁢⁢name>M 5.9 - 2012 Jan 15, SOUTH SHETLAND ISLANDS⁢⁢<⁢⁢/name>
     <⁢⁢⁢⁢magnitude>5.9<⁢⁢⁢⁢/magnitude>
     ⁢⁢<⁢⁢Point>
      ⁢⁢<⁢⁢coordinates>-56.072,-60.975,0⁢⁢<⁢⁢/coordinates>
     ⁢<⁢⁢/Point>
    ⁢⁢<⁢⁢/Placemark>
    <⁢⁢⁢Placemark id="2012 Jan 19 06:48:48.75 UTC">
---

「233-ol3ex.js」
var styleCache = {};
var styleFunction = function(feature, resolution) {
/** 2012_Earthquakes_Mag5.kml stores the magnitude of each 
 * earthquake in a standards-violating <magnitude> 
 * tag in each Placemark.  We extract it from the 
 * Placemark's name instead.
 * 2012_Earthquakes_Mag5.kml は、それぞれの Placemark に、標準
 * 規格に違反する <magnitude> タグに各地震のマグニチュードを
 * 格納します。代わりに Placemark の名前からそれを抽出します。
 */
 var name = feature.get('name');
 /** get(key)
  * Gets a value.
  * (ol3 API[説明は Stable Only のチェックを外すと表示])
  */
 var magnitude = parseFloat(name.substr(2));
 /** parseFloat()
  * 引数として与えられた文字列を解析し、浮動小数点数を返します。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/parseFloat])
  */ 
 /** String.prototype.substr()
  * The substr() method returns the characters in a 
  * string beginning at the specified location 
  * through the specified number of characters.
  * substr()メソッドは、文字列内の指定した位置から始まり、
  * 指定した文字数のまでの文字を返します。
  * (MDN[https://developer.mozilla.org/en-US/docs/Web/
  * JavaScript/Reference/Global_Objects/String/substr])
  */
 var radius = 5 + 20 * (magnitude - 5);
 var style = styleCache[radius];
 if (!style) {
  style = [new ol.style.Style({
  /** ol.style.Style 
  * Base class for vector feature rendering styles.
  * ベクタフィーチャがスタイルを描画するための基本クラス。
  * (ol3 API)
  */
   image: new ol.style.Circle({
   /** ol.style.Circle
    * Set circle style for vector features.
    * ベクタフィーチャの円のスタイルを設定。(ol3 API)
    */
    radius: radius,
    fill: new ol.style.Fill({
    /** ol.style.Fill 
     * Set fill style for vector features.
     * ベクタフィーチャの塗りつぶしスタイルを設定。(ol3 API)
     */
     color: 'rgba(255, 153, 0, 0.4)'
    }),
    stroke: new ol.style.Stroke({
    /** ol.style.Stroke 
     * Set stroke style for vector features. 
     * Note that the defaults given are the Canvas defaults, 
     * which will be used if option is not defined. 
     * The get functions return whatever was entered 
     * in the options;  they will not return the default.
     * ベクタフィーチャのためのストロークスタイルの設定。
     * デフォルトは、オプションが定義されていない場合に使用される
     * Canvas のデフォルトを与えられることに注意してください。 
     * GET機能は、オプションで入力されたものはすべて返します。
     * それらはデフォルトを返しません。(ol3 API)
     */
     color: 'rgba(255, 204, 0, 0.2)',
     width: 1
    })
   })
  })];
  styleCache[radius] = style;
 }
 return style;
};
var vector = new ol.layer.Vector({
/** ol.layer.Vector
 * Vector data that is rendered client-side.
 * クライアント側で描画されるベクタデータ。(ol3 API)
 */
 source: new ol.source.KML({
 /** ol.source.KML 
  * Static vector source in KML format
  * KML フォーマットの静的ベクタソース(0l3 API)
  */
  extractStyles: false,
  projection: 'EPSG:3857',
  // url: 'data/kml/2012_Earthquakes_Mag5.kml'
  url: 'v3.0.0/examples/data/kml/2012_Earthquakes_Mag5.kml'
 // 修正
 }),
 style: styleFunction
});
var raster = new ol.layer.Tile({
/** ol.layer.Tile 
 * For layer sources that provide pre-rendered, tiled 
 * images in grids that are organized by zoom levels for 
 * specific resolutions. 
 * プリレンダリング(事前描画)を提供するレイヤソースのための、
 * 特定の解像度でのズームレベルによって編成されているグリッドの
 * タイルイメージ。(ol3 API)
 */
 source: new ol.source.Stamen({
 /** ol.source.Stamen
  * Layer source for the Stamen tile server.
  * Stamen タイルサーバのレイヤソース。(ol3 API)
  * (2 - ol3ex 24b - Stamen example 2 参照)
  */
  layer: 'toner'
  })
});
var map = new ol.Map({
 layers: [raster, vector],
 target: 'map',
 view: new ol.View({
  center: [0, 0],
  zoom: 2
 })
});
var info = $('#info');
info.tooltip({
/** Tooltips tooltip.js
 * Inspired by the excellent jQuery.tipsy plugin written 
 * by Jason Frame; Tooltips are an updated version, 
 * which don't rely on images, use CSS3 for animations, 
 * and data-attributes for local title storage.
 * Jason Frame によって書かれた優れたjQuery.tipsyプラグイン
 * に触発されました。Tooltips は、更新されたバージョンで、画像
 * に依存しない、アニメーションに CSS3 を使用し、ローカルタイト
 * ル·ストレージのためのデータの属性です。
 * (Bootstrap[http://getbootstrap.com/javascript/
 * #tooltips])
 * 
 * カーソルを何かの項目に合わせたとき、その項目に覆いかぶさるよう
 * な形で小さな枠が出現し、その枠内には選択された項目に関する補足
 * 情報が表示される。
 * (ツールチップ[http://ja.wikipedia.org/wiki/
 * %E3%83%84%E3%83%BC%E3%83%AB%E3%83%81%E3%83%83%E3%83%97])
 */
 animation: false,
 /** animation
  * Apply a CSS fade transition to the tooltip
  * ツールチップにCSSのフェードトランジション(遷移)を適用しま
  * す。
  */
 trigger: 'manual'
 /** trigger
  * How tooltip is triggered - click | hover |
  *  focus | manual. You may pass multiple triggers; 
  * separate them with a space.
  * ツールチップがトリガされる方法 - click | hover |
  *  focus | manual。複数のトリガを設定するには、スペースで
  * 分割。
  */
});
var displayFeatureInfo = function(pixel) {
 info.css({
/** .css()
  * Get the computed style properties for the first element 
  * in the set of matched elements.
  * マッチした要素のセットの最初の要素の計算されたスタイルプロ
  * パティを取得します。
  * (jQuery[http://api.jquery.com/css/])
  */ 
  left: pixel[0] + 'px',
  top: (pixel[1] - 15) + 'px'
 });
 var feature = map.forEachFeatureAtPixel(pixel, function(feature, layer) {
 /** forEachFeatureAtPixel
  * Detect features that intersect a pixel on the viewport, 
  * and execute a callback with each intersecting feature. 
  * Layers included in the detection can be configured 
  * through opt_layerFilter. Feature overlays will always 
  * be included in the detection.
  * ビューポート上のピクセルと交差するフィーチャを検出し、
  * 各交差するフィーチャとコールバックを実行します。
  * 検出に含まれるレイヤが opt_layerFilter を通じて
  * 設定することができます。フィーチャーオーバーレイは
  * 常に検出に含まれます。(ol3 API)
  */
  return feature;
 });
 if (feature) {
  info.tooltip('hide')
  /** .tooltip('hide')
   * Hides an element's tooltip. Returns to the caller 
   * before the tooltip has actually been hidden (i.e. 
   * before the hidden.bs.tooltip event occurs). 
   * This is considered a "manual" triggering of the 
   * tooltip.
   * 要素のツールチップを非表示にします。ツールチップが実際に
   * 隠される前(すなわち、hidden.bs.tooltipイベントが発生
   * する前)に、caller が返されます。これは、ツールチップの
   * トリガ(trigger:) が manyal とみなされます。
   * (Bootstrap[http://getbootstrap.com/javascript/
   * #tooltips])
   */
   .attr('data-original-title', feature.get('name'))
   /** .attr()
    * Get the value of an attribute for the first element 
    * in the set of matched elements or set one or more 
    * attributes for every matched element.
     * マッチした要素のセットの最初の要素の属性の値を取得するか、
     * すべての一致した要素の1つ以上の属性を設定します。
    * (jQuery[http://api.jquery.com/attr/])
     */
   /** get(key)
    * Gets a value.
    * (ol3 API[説明は Stable Only のチェックを外すと表示])
    */
   .tooltip('fixTitle')
   // 変更した title 属性を tooltip に反映
   .tooltip('show');
   /** .tooltip('show')
    * Reveals an element's tooltip. Returns to the caller 
    * before the tooltip has actually been shown (i.e. 
    * before the shown.bs.tooltip event occurs). 
    * This is considered a "manual" triggering of the 
    * tooltip. Tooltips with zero-length titles are never 
    * displayed.
    * 要素のツールチップをRevealsにします。ツールチップが実際に
    * 表示される前(すなわち、shown.bs.tooltipイベントが発生
    * する前)に、caller が返されます。これは、ツールチップの
    * トリガ(trigger:) が manyal とみなされます。
    * zero-length タイトルのツールチップは決して表示されません。
    * (Bootstrap[http://getbootstrap.com/javascript/
    * #tooltips])
    */
 } else {
  info.tooltip('hide');
 }
};
$(map.getViewport()).on('mousemove', function(evt) {
/** getViewport()
 * Return: Viewport (ol3 API)
 */
// jQuery on イベント
 displayFeatureInfo(map.getEventPixel(evt.originalEvent));
 /** getEventPixel
  * Returns the map pixel position for a browser event.
  * ブラウザイベントに対して、マップのピクセル位置を返します。
  * (ol3 API)
  */
});
map.on('click', function(evt) {
/** on
 * Listen for a certain type of event.
 * あるタイプのイベントをリッスンします。(ol3 API)
 */
 displayFeatureInfo(evt.pixel);
});


2 - ol3ex 33a - Earthquakes in KML 1

「Earthquakes in KML(kml-earthquakes.html)」を参考に地図を表示してみます。

HTML ファイルの作成
a Eclipse のメニューの「ファイル」->「ファイルを開く」をクリックします。





b 「ファイルを開く」ウィンドウで、「user」->「mapsite」->「ol3proj」->「v3.0.0」->「examples」->「kml-earthquakes.html」をクリックして選択し、「OK」ボタンをクリックします。
同じように「kml-earthquakes.js」を開きます。





c メニューの「ファイル」->「新規」 -> 「ファイル」をクリックします。



d 「ファイル」ウィンドウで「ol3proj」をクリックして選択し、「ファイル名」を「233-ol3ex.html」と入力し、「次へ」ボタンをクリックします。








e 「File Template」ウィンドウで「HTML 5 Template」をクリックして選択し、「OK」ボタンをクリックします。











f 「kml-earthquakes.html」の内容をコピーして「233-ol3ex.html」に貼り付け、修正します。
g 同じように、新規に「233-ol3ex.js」ファイルを作成し、「File Template」ウィンドウで「JavaScript Template」をクリックして選択し、「完了」ボタンをクリックして、「kml-earthquakes.js」の内容をコピーして貼り付け、修正します。「kml-earthquakes-require.js」も「233-ol3ex-require.js」に貼り付けます。


「233-ol3ex.html」
<!doctype html>
<html lang="en">
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<!--
  <link rel="stylesheet" href="../css/ol.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="../resources/layout.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
-->
  <!-- ディレクトリ修正 -->
  <link rel="stylesheet" href="v3.0.0/css/ol.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/layout.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
  <title>Earthquakes in KML</title>
  <style>
   #map {
    position: relative;
   }
   #info {
    position: absolute;
    height: 1px;
    width: 1px;
    z-index: 100;
   }
   .tooltip.in {
    opacity: 1;
    filter: alpha(opacity=100);
   }
   .tooltip.top .tooltip-arrow {
    border-top-color: white;
   }
   .tooltip-inner {
    border: 2px solid white;
   }
  </style>
 </head>
 <body>
  <!-- 
  bootstrap.min.css, bootstrap-responsive.min.css で設定されたセレクタを使用。
  -->
  <div class="navbar navbar-inverse navbar-fixed-top">
   <div class="navbar-inner">
    <div class="container">
<!--
     <a class="brand" href="./"><img src="../resources/logo.png"> OpenLayers 3 Examples</a>
-->
      <!-- ディレクトリ修正 -->
     <a class="brand" href="v3.0.0/examples/"><img src="v3.0.0/resources/logo.png"> OpenLayers 3 Examples</a>
    </div>
   </div>
  </div>
  <div class="container-fluid">
   <div class="row-fluid">
    <div class="span12">
     <div id="map" class="map"><div id="info"></div></div>
    </div>
   </div>
   <div class="row-fluid">
    <div class="span12">
     <h4 id="title">Earthquakes in KML</h4>
     <p id="shortdesc">Demonstrates the use of a Shape symbolizer to render earthquake locations.</p>
     <div id="docs">
      <p>This example parses a KML file and renders the features as a vector layer.
       The layer is given a <code>style</code> that renders earthquake locations
       with a size relative to their magnitude.</p>
<!--
      <p>See the <a href="kml-earthquakes.js" target="_blank">kml-earthquakes.js source</a> to see how this is done.</p>
-->
       <!-- ファイル修正 -->
      <p>See the <a href="233-ol3ex.js" target="_blank">233-ol3ex.js source</a> to see how this is done.</p>
     </div>
     <div id="tags">KML, vector, style</div>
    </div>
   </div>
  </div>
<!--
  <script src="jquery.min.js" type="text/javascript"></script>
  <script src="../resources/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="../resources/example-behaviour.js" type="text/javascript"></script>
-->
  <!-- ディレクトリ修正
   jQuery Minified版と
   bootstrap.min.js(tooltip など)
   example-behaviour.js(Examples用 JSコード[文字コードなど])
  -->
  <script src="v3.0.0/examples/jquery.min.js" type="text/javascript"></script>
  <script src="v3.0.0/resources/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="v3.0.0/resources/example-behaviour.js" type="text/javascript"></script>
<!--
  <script src="loader.js?id=kml-earthquakes" type="text/javascript"></script>
-->
  <!-- ファイル修正 -->  <!-- ディレクトリ修正 -->
  <script src="loader.js?id=233-ol3ex" type="text/javascript"></script>

 </body>
</html>

2 - ol3ex 32b - Timezones in KML 2

「kml-timezones.js(232-ol3ex.js)」は、マップを表示するための JavaScript ファイルです。
timezones.kml の内容は、次のようになっています。
「timezones.kml」
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
 <Style id="hidelist"><ListStyle><listItemType>checkHideChildren</listItemType><bgColor>00ffffff</bgColor><maxSnippetLines>0</maxSnippetLines></ListStyle></Style>
 <Style id="nStylem1200"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d261d6cd</color></PolyStyle></Style>
  <Style id="nStylem1100"><LineStyle><color>4cffffff</color><width>1.0</width></LineStyle><PolyStyle><color>d25bb85f</color></PolyStyle></Style>
---
 <Style id="hStylem1200"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da61d6cd</color></PolyStyle></Style>
 <Style id="hStylem1100"><LineStyle><color>c0ffffff</color><width>1.0</width></LineStyle><PolyStyle><color>da5bb85f</color></PolyStyle></Style>
---
 <StyleMap id="khStylem1200"><Pair><key>normal</key><styleUrl>#nStylem1200</styleUrl></Pair><Pair><key>highlight</key><styleUrl>#hStylem1200</styleUrl></Pair></StyleMap>
 <StyleMap id="khStylem1100"><Pair><key>normal</key><styleUrl>#nStylem1100</styleUrl></Pair><Pair><key>highlight</key><styleUrl>#hStylem1100</styleUrl></Pair></StyleMap>
---
 <styleUrl>#hidelist</styleUrl>
 <Placemark>
  <name>GMT -12:00</name>
  <description><![CDATA[<div style="width:300px;height:50px;"  id="clock" ></div>
   <script language="JavaScript">
    var int=self.setInterval("tick()",50);
    function tick(){
     document.getElementById("clock").innerHTML=calc(-12);
    }
    function calc(offset) {
     d = new Date();
     utc = d.getTime() + (d.getTimezoneOffset() * 60000);
     nd = new Date(utc + (3600000*offset));
     return nd.toLocaleString();
    }
   </script>
  ]]></description>
  <styleUrl>#khStylem1200</styleUrl>
  <MultiGeometry>
   <Polygon>
    <outerBoundaryIs>
     <LinearRing>
      <coordinates>
       -179.0623,-89.90000000000001,0 -180,-89.90000000000001,0 -180,-86.5,0 -180,-81.49999,0 -180,-76.5,0 -180,-71.5,0 -180,-66.5,0 -180,-61.5,0 -180,-56.5,0 -180,-51.50000000000001,0 -176.2216,-48.22535,0 -172.5,-45,0 -172.4998,-50,0 -172.4996,-55.00000000000001,0 -172.4995,-60.00000000000001,0 -172.4993,-65,0 -172.4991,-70,0 -172.4989,-75,0 -172.4987,-80,0 -172.4986,-83.3,0 -172.4984,-88.3,0 -172.4984,-89.90000000000001,0 -173.4361,-89.90000000000001,0 -174.3738,-89.90000000000001,0 -175.3115,-89.90000000000001,0 -176.2492,-89.90000000000001,0 -177.1869,-89.90000000000001,0 -178.1246,-89.90000000000001,0 -179.0623,-89.90000000000001,0 
      </coordinates>
     </LinearRing>
    </outerBoundaryIs>
    <tessellate>1</tessellate>
   </Polygon>
   <Polygon>
    <outerBoundaryIs>
     <LinearRing>
      <coordinates>
       -172.509,74.89999,0 -172.509,70.23302,0 -175.7817,72.31562,0 -180,75,0 -180,79.90000000000001,0 -180,84.90001,0 -180,89.90000000000001,0 -179.0636,89.90000000000001,0 -178.1273,89.90000000000001,0 -177.1909,89.90000000000001,0 -176.2545,89.90000000000001,0 -175.3181,89.90000000000001,0 -174.3818,89.90000000000001,0 -173.4454,89.90000000000001,0 -172.509,89.90000000000001,0 -172.509,84.90001,0 -172.509,79.90000000000001,0 -172.509,74.89999,0
      </coordinates>
     </LinearRing>
    </outerBoundaryIs>
    <tessellate>1</tessellate>
   </Polygon>
  </MultiGeometry>
 </Placemark>
 <Placemark>
  <name>GMT -11:00</name>
---
「232-ol3ex.js」
var styleFunction = function(feature, resolution) {
 var offset = 0;
 var name = feature.get('name'); // e.g. GMT -08:30
 /** get(key)
  * Gets a value.
  * (ol3 API[説明は Stable Only のチェックを外すと表示])
  */
 var match = name.match(/([\-+]\d{2}):(\d{2})$/);
 /**
  * /([\-+]\d{2}):(\d{2})$/
  * [\-+] --- - または +
  * \d --- 数値
  * \d{2} --- 2個の数値
  * $ --- 行の最後
  * (-> 00:00 という文字列) 
  */
 if (match) {
  var hours = parseInt(match[1], 10);
  /** parseInt(string, radix)
   * str: 文字列, radix: 基数(進法)
   * 文字列の引数をパースし、指定された基数の整数を返します。
   * (MDN[https://developer.mozilla.org/ja/docs/Web/
   * JavaScript/Reference/Global_Objects/parseInt])
   */
  /** String.prototype.match()
   * 正規表現 に対する 文字列 のマッチングの際に、そのマッチ
   * 結果を得るために使われます。
   * (MDN[https://developer.mozilla.org/ja/docs/Web/
   * JavaScript/Reference/Global_Objects/String/match])
   */
  var minutes = parseInt(match[2], 10);
  offset = 60 * hours + minutes;
 }
 var date = new Date();
 /** Date
  * 日付や時刻を扱うことが可能な、JavaScript の Date 
  * インスタンスを生成します。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/Date])
  */
 var local = new Date(date.getTime() +
  (date.getTimezoneOffset() + offset) * 60000);
 // offset from local noon (in hours)
 /** Date.prototype.getTime()
  * ユニバーサル時間に従い、指定された日付の時刻に対応する数
  * 値を返します。
  * GetTime メソッドによって返される値は、1970 年 1 月 1 日 
  * 00:00:00 UTC からの経過ミリ秒です。このメソッドは、日付
  * と時刻を別の Date オブジェクトに割り当てるために使用できま
  * す。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/Date/getTime])
  */
 /** Date.prototype.getTimezoneOffset()
  * UTCと現在のロケール時間との差を分単位で返します。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/Date/
  * getTimezoneOffset])
  */
 var delta = Math.abs(12 - local.getHours() + (local.getMinutes() / 60));
  /** Math.abs()
   * 引数として与えた数の絶対値を返します。
   * (MDN[https://developer.mozilla.org/ja/docs/Web/
   * JavaScript/Reference/Global_Objects/Math/abs])
   */
 /** Date.prototype.getHours()
  * 地方時に基づき、指定された日時の「時」を返します。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/Date/getHours])
  */
 /** Date.prototype.getMinutes()
  * ローカル時刻の「分」(minutes)を返します。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/
  * JavaScript/Reference/Global_Objects/Date/getMinutes])
  */
 if (delta > 12) {
  delta = 24 - delta;
 }
 var opacity = 0.75 * (1 - delta / 12);
 return [new ol.style.Style({
 /** ol.style.Style 
  * Base class for vector feature rendering styles.
  * ベクタフィーチャがスタイルを描画するための基本クラス。
  * (ol3 API)
  */
  fill: new ol.style.Fill({
  /** ol.style.Fill 
   * Set fill style for vector features.
   * ベクタフィーチャの塗りつぶしスタイルを設定。(ol3 API)
   */
   color: [0xff, 0xff, 0x33, opacity]
  }),
  stroke: new ol.style.Stroke({
  /** ol.style.Stroke 
   * Set stroke style for vector features. 
   * Note that the defaults given are the Canvas defaults, 
   * which will be used if option is not defined. 
   * The get functions return whatever was entered 
   * in the options;  they will not return the default.
   * ベクタフィーチャのためのストロークスタイルの設定。
   * デフォルトは、オプションが定義されていない場合に使用される
   * Canvas のデフォルトを与えられることに注意してください。 
   * GET機能は、オプションで入力されたものはすべて返します。
   * それらはデフォルトを返しません。(ol3 API)
   */
   color: '#ffffff'
  })
 })];
};
var vector = new ol.layer.Vector({
/** ol.layer.Vector
 * Vector data that is rendered client-side.
 * クライアント側で描画されるベクタデータ。(ol3 API)
 */
 source: new ol.source.KML({
 /** ol.source.KML 
  * Static vector source in KML format
  * KML フォーマットの静的ベクタソース(0l3 API)
  */
  extractStyles: false,
  projection: 'EPSG:3857',
  // url: 'data/kml/timezones.kml'
  url: 'v3.0.0/examples/data/kml/timezones.kml' // 修正
 }),
 style: styleFunction
});
var raster = new ol.layer.Tile({
/** ol.layer.Tile 
 * For layer sources that provide pre-rendered, tiled 
 * images in grids that are organized by zoom levels for 
 * specific resolutions. 
 * プリレンダリング(事前描画)を提供するレイヤソースのための、
 * 特定の解像度でのズームレベルによって編成されているグリッドの
 * タイルイメージ。(ol3 API)
 */
 source: new ol.source.Stamen({
 /** ol.source.Stamen
  * Layer source for the Stamen tile server.
  * Stamen タイルサーバのレイヤソース。(ol3 API)
  * (2 - ol3ex 24b - Stamen example 2 参照)
  */
  layer: 'toner'
 })
});
var map = new ol.Map({
 layers: [raster, vector],
 target: 'map',
 view: new ol.View({
  center: [0, 0],
  zoom: 2
 })
});
var info = $('#info');
info.tooltip({
/** Tooltips tooltip.js
 * Inspired by the excellent jQuery.tipsy plugin written 
 * by Jason Frame; Tooltips are an updated version, 
 * which don't rely on images, use CSS3 for animations, 
 * and data-attributes for local title storage.
 * Jason Frame によって書かれた優れたjQuery.tipsyプラグイン
 * に触発されました。Tooltips は、更新されたバージョンで、画像
 * に依存しない、アニメーションに CSS3 を使用し、ローカルタイト
 * ル·ストレージのためのデータの属性です。
 * (Bootstrap[http://getbootstrap.com/javascript/
 * #tooltips])
 * カーソルを何かの項目に合わせたとき、その項目に覆いかぶさるよう
 * な形で小さな枠が出現し、その枠内には選択された項目に関する補足
 * 情報が表示される。
 * (ツールチップ[http://ja.wikipedia.org/wiki/
 * %E3%83%84%E3%83%BC%E3%83%AB%E3%83%81%E3%83%83%E3%83%97])
 */
 animation: false,
 /** animation
  * Apply a CSS fade transition to the tooltip
  * ツールチップにCSSのフェードトランジション(遷移)を適用しま
  * す。
  */
 trigger: 'manual'
 /** trigger
  * How tooltip is triggered - click | hover |
  *  focus | manual. You may pass multiple triggers; 
  * separate them with a space.
  * ツールチップがトリガされる方法 - click | hover |
  *  focus | manual。複数のトリガを設定するには、スペースで
  * 分割。
  */
});
var displayFeatureInfo = function(pixel) {
 info.css({
 /** .css()
  * Get the computed style properties for the first element 
  * in the set of matched elements.
  * マッチした要素のセットの最初の要素の計算されたスタイルプロ
  * パティを取得します。
  * (jQuery[http://api.jquery.com/css/])
  */ 
  left: pixel[0] + 'px',
  top: (pixel[1] - 15) + 'px'
 });
 var feature = map.forEachFeatureAtPixel(pixel, function(feature, layer) {
 /** forEachFeatureAtPixel
  * Detect features that intersect a pixel on the viewport, 
  * and execute a callback with each intersecting feature. 
  * Layers included in the detection can be configured 
  * through opt_layerFilter. Feature overlays will always 
  * be included in the detection.
  * ビューポート上のピクセルと交差するフィーチャを検出し、
  * 各交差するフィーチャとコールバックを実行します。
  * 検出に含まれるレイヤが opt_layerFilter を通じて
  * 設定することができます。フィーチャーオーバーレイは
  * 常に検出に含まれます。(ol3 API)
  */
  return feature;
 });
 if (feature) {
  info.tooltip('hide')
  /** .tooltip('hide')
   * Hides an element's tooltip. Returns to the caller 
   * before the tooltip has actually been hidden (i.e. 
   * before the hidden.bs.tooltip event occurs). 
   * This is considered a "manual" triggering of the 
   * tooltip.
   * 要素のツールチップを非表示にします。ツールチップが実際に
   * 隠される前(すなわち、hidden.bs.tooltipイベントが発生
   * する前)に、caller が返されます。これは、ツールチップの
   * トリガ(trigger:) が manyal とみなされます。
   * (Bootstrap[http://getbootstrap.com/javascript/
   * #tooltips])
   */
   .attr('data-original-title', feature.get('name'))
   /** .attr()
    * Get the value of an attribute for the first element 
    * in the set of matched elements or set one or more 
    * attributes for every matched element.
     * マッチした要素のセットの最初の要素の属性の値を取得するか、
     * すべての一致した要素の1つ以上の属性を設定します。
    * (jQuery[http://api.jquery.com/attr/])
     */
   /** get(key)
    * Gets a value.
    * (ol3 API[説明は Stable Only のチェックを外すと表示])
    */
   .tooltip('fixTitle')
   // 変更した title 属性を tooltip に反映
   .tooltip('show');
   /** .tooltip('show')
    * Reveals an element's tooltip. Returns to the caller 
    * before the tooltip has actually been shown (i.e. 
    * before the shown.bs.tooltip event occurs). 
    * This is considered a "manual" triggering of the 
    * tooltip. Tooltips with zero-length titles are never 
    * displayed.
    * 要素のツールチップをRevealsにします。ツールチップが実際に
    * 表示される前(すなわち、shown.bs.tooltipイベントが発生
    * する前)に、caller が返されます。これは、ツールチップの
    * トリガ(trigger:) が manyal とみなされます。
    * zero-length タイトルのツールチップは決して表示されません。
    * (Bootstrap[http://getbootstrap.com/javascript/
    * #tooltips])
    */
 } else {
  info.tooltip('hide');
 }
};
$(map.getViewport()).on('mousemove', function(evt) {
/** getViewport()
 * Return: Viewport (ol3 API)
 */
// jQuery on イベント
 displayFeatureInfo(map.getEventPixel(evt.originalEvent));
 /** getEventPixel
  * Returns the map pixel position for a browser event.
  * ブラウザイベントに対して、マップのピクセル位置を返します。
  * (ol3 API)
  */
});
map.on('click', function(evt) {
/** on
 * Listen for a certain type of event.
 * あるタイプのイベントをリッスンします。(ol3 API)
 */
 displayFeatureInfo(evt.pixel);
});

originalEvent
「ol.MapBrowserEvent」
(Events emitted as map browser events are instances of this type. See ol.Map for which events trigger a map browser event.
マップブラウザイベントとして発するイベントは、このタイプのインスタンスです。イベントがマップブラウザイベントをトリガする ol.Map を参照してください。)
のメンバ。

ol/ol/mapbrowserevent.js 32行目
 * @param {goog.events.BrowserEvent} browserEvent Browser event.
ol/ol/mapbrowserevent.js 52行目
 this.originalEvent = browserEvent.getBrowserEvent();

goog.events.BrowserEvent
「events.BrowserEvent - Extends goog.events.Event」
(http://docs.closure-library.googlecode.com/git/class_goog_events_BrowserEvent.html)
Accepts a browser event object and creates a patched, cross browser event object. The content of this object will not be initialized if no event object is provided. If this is the case, init() needs to be invoked separately.
events.BrowserEvent。goog.events.Eventを拡張します。
ブラウザイベントオブジェクトを受け入れ、パッチを適用した、クロスブラウザイベントオブジェクトを作成します。イベントオブジェクトが提供されない場合は、このオブジェクトの内容は初期化されません。この場合は、init()は別々に呼び出す必要があります。

「Instance Methods」
getBrowserEvent() ⇒ Event
No description.
Returns: Event  The underlying browser event object. 

2 - ol3ex 32a - Timezones in KML 1

「Timezones in KML(kml-timezones.html)」を参考に地図を表示してみます。

HTML ファイルの作成
a Eclipse のメニューの「ファイル」->「ファイルを開く」をクリックします。





b 「ファイルを開く」ウィンドウで、「user」->「mapsite」->「ol3proj」->「v3.0.0」->「examples」->「kml-timezones.html」をクリックして選択し、「OK」ボタンをクリックします。
同じように「kml-timezones.js」を開きます。





c メニューの「ファイル」->「新規」 -> 「ファイル」をクリックします。



d 「ファイル」ウィンドウで「ol3proj」をクリックして選択し、「ファイル名」を「232-ol3ex.html」と入力し、「次へ」ボタンをクリックします。








e 「File Template」ウィンドウで「HTML 5 Template」をクリックして選択し、「OK」ボタンをクリックします。











f 「kml-timezones.html」の内容をコピーして「232-ol3ex.html」に貼り付け、修正します。
g 同じように、新規に「232-ol3ex.js」ファイルを作成し、「File Template」ウィンドウで「JavaScript Template」をクリックして選択し、「完了」ボタンをクリックして、「kml-timezones.js」の内容をコピーして貼り付け、修正します。「kml-timezones-require.js」も「232-ol3ex-require.js」に貼り付けます。


「232-ol3ex.html」
<!doctype html>
<html lang="en">
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<!--
  <link rel="stylesheet" href="../css/ol.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="../resources/layout.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
-->
  <!-- ディレクトリ修正 -->
  <link rel="stylesheet" href="v3.0.0/css/ol.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/layout.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
  <title>Timezones in KML</title>
  <style>
   #map {
    position: relative;
   }
   #info {
    position: absolute;
    height: 1px;
    width: 1px;
    z-index: 100;
   }
  </style>
 </head>
 <body>
  <!-- 
  bootstrap.min.css, bootstrap-responsive.min.css で設定されたセレクタを使用。
  -->
  <div class="navbar navbar-inverse navbar-fixed-top">
   <div class="navbar-inner">
    <div class="container">
<!--
     <a class="brand" href="./"><img src="../resources/logo.png"> OpenLayers 3 Examples</a>
-->
      <!-- ディレクトリ修正 -->
     <a class="brand" href="v3.0.0/examples/"><img src="v3.0.0/resources/logo.png"> OpenLayers 3 Examples</a>
    </div>
   </div>
  </div>
  <div class="container-fluid">
   <div class="row-fluid">
    <div class="span12">
     <div id="map" class="map"><div id="info"></div></div>
    </div>
   </div>
   <div class="row-fluid">
    <div class="span12">
     <h4 id="title">Timezones in KML</h4>
     <p id="shortdesc">Demonstrates rendering timezones from KML.</p>
     <div id="docs">
      <p>This example parses a KML file and renders the features as a vector layer.
       The layer is given a <code>ol.style.Style</code> that fills timezones yellow
       with an opacity calculated based on the current offset to local noon.</p>
<!--
      <p>See the <a href="kml-timezones.js" target="_blank">kml-timezones.js source</a> to see how this is done.</p>
-->
       <!-- ファイル修正 -->
      <p>See the <a href="232-ol3ex.js" target="_blank">232-ol3ex.js source</a> to see how this is done.</p>
     </div>
     <div id="tags">KML, vector, style</div>
    </div>
   </div>
  </div>
<!--
  <script src="jquery.min.js" type="text/javascript"></script>
  <script src="../resources/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="../resources/example-behaviour.js" type="text/javascript"></script>
-->
  <!-- ディレクトリ修正
   jQuery Minified版と
   bootstrap.min.js(tooltip など)
   example-behaviour.js(Examples用 JSコード[文字コードなど])
  -->
  <script src="v3.0.0/examples/jquery.min.js" type="text/javascript"></script>
  <script src="v3.0.0/resources/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="v3.0.0/resources/example-behaviour.js" type="text/javascript"></script>
<!--
  <script src="loader.js?id=kml" type="text/javascript"></script>
-->
  <!-- ファイル修正 -->  <!-- ディレクトリ修正 -->
  <script src="loader.js?id=232-ol3ex" type="text/javascript"></script>

 </body>
</html>

2 - ol3ex 31b - KML example 2

「kml.js(231-ol3ex.js)」は、マップを表示するための JavaScript ファイルです。

KML(Keyhole Markup Language) は、Google が開発しました。OGC と Google は、OGC 標準規格に沿うように作業が進められています。
「Open Geospatial Consortium(http://www.opengeospatial.org/)」の「KML(http://www.opengeospatial.org/standards/kml)」に次のようにあります。

*****
1) Overview の一部を抜粋

KML is an XML language focused on geographic visualization, including annotation of maps and images. Geographic visualization includes not only the presentation of graphical data on the globe, but also the control of the user's navigation in the sense of where to go and where to look.
KMLは、地図や画像の注釈を含む地理的可視化に焦点を当てたXML言語です。地理的可視化は、地球上のグラフィカルなデータの提示だけでなく、どこに行きどこを見るというユーザのナビゲーションの制御を含んでいます。

From this perspective, KML is complementary to most of the key existing OGC standards including GML (Geography Markup Language), WFS (Web Feature Service) and WMS (Web Map Service). Currently, KML 2.2 utilizes certain geometry elements derived from GML 2.1.2. These elements include point, line string, linear ring, and polygon.
このような観点から、KML は GML(Geography Markup Language)とWFS(Web Feature Service)、WMS(Web Map Service)を含む主要な既存のOGC 標準規格のほとんどに相補います。現在、KML2.2 が GML2.1.2 に由来し、特定のジオメトリ要素を利用しています。これらの要素は、ポイント、ラインストリング、リニアリング、およびポリゴンが含まれます。
*****

2012-02-10.kml の内容は、次のようになっています。

「2012-02-10.kml」
<kml>
 <Document>
  <name>Skimap.org OpenSkiMap </name>
  <description>Created from OpenStreetMap data. Renderer v0.5</description>
  <!-- 
Copyright (c) OpenStreetMap Contributors
http://www.openstreetmap.org/

This work is licensed under the
Creative Commons Attribution-ShareAlike 2.0 License.
http://creativecommons.org/licenses/by-sa/2.0/
 -->
  <ScreenOverlay id="CopyrightNotice">
   <name>Copyright Notice</name>
   <description>
    <![CDATA[The data in this KML file is Copyright <a href="http://www.openstreetmap.org/">OpenStreetMap</a> Contributors. It is available under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike (CC-BY-SA) Version 2.0 License</a>.]]>
   </description>
   <Snippet>Copyright (c) OpenStreetMap Contributors. CC-BY-SA 2.0 License.</Snippet>
   <Icon>
    <href>OSMCopyright.png</href>
   </Icon>
   <overlayXY x="0" xunits="fraction" y="1" yunits="fraction"/>
   <screenXY x="0" xunits="fraction" y="1" yunits="fraction"/>
   <size x="0" xunits="fraction" y="0" yunits="fraction"/>
  </ScreenOverlay>
  <Folder>
   <name>POI</name>
   <description>Points of Interest</description>
  <Folder>
  <name>Parking</name>
  <Style id="style-Parking">
   <IconStyle>
    <scale>0.2</scale>
    <Icon>
     <href>http://maps.google.com/mapfiles/kml/shapes/parking_lot.png</href>
    </Icon>
   </IconStyle>
  </Style>
  <Placemark>
   <styleUrl>#style-Parking</styleUrl>
   <Point>
    <coordinates>7.5584046,46.4880564,0</coordinates>
   </Point>
  </Placemark>
  <Placemark>
   <name>Coop</name>
---

「231-ol3ex.js」
var projection = ol.proj.get('EPSG:3857');
// EPSG:900913 -> EPSG:3857 コード名変更(内容は同じ)
/** ol.proj.get(projectionLike)
 * Fetches a Projection object for the code specified.
 * 指定されたコードのプロジェクション·オブジェクトを取得
 * (ol3 API)
 */
var raster = new ol.layer.Tile({
/** ol.layer.Tile 
 * For layer sources that provide pre-rendered, tiled 
 * images in grids that are organized by zoom levels for 
 * specific resolutions. 
 * プリレンダリング(事前描画)を提供するレイヤソースのための、
 * 特定の解像度でのズームレベルによって編成されているグリッドの
 * タイルイメージ。(ol3 API)
 */
 source: new ol.source.BingMaps({
 /** ol.source.BingMaps
  * Layer source for Bing Maps tile data.
  * Bing Maps タイルデータのレイヤソース。(ol3 API)
  */
  imagerySet: 'Aerial',
  key: 'Ak-dzM...(省略)'
 })
});
var vector = new ol.layer.Vector({
/** ol.layer.Vector
 * Vector data that is rendered client-side.
 * クライアント側で描画されるベクタデータ。(ol3 API)
 */
 source: new ol.source.KML({
 /** ol.source.KML 
  * Static vector source in KML format
  * KML フォーマットの静的ベクタソース(0l3 API)
  */
  projection: projection,
  // url: 'data/kml/2012-02-10.kml'
  url: 'v3.0.0/examples/data/kml/2012-02-10.kml' // 修正
 })
});
var map = new ol.Map({
 layers: [raster, vector],
 target: document.getElementById('map'),
 view: new ol.View({
  center: [876970.8463461736, 5859807.853963373],
  projection: projection,
  zoom: 10
 })
});
var displayFeatureInfo = function(pixel) {
 var features = [];
 map.forEachFeatureAtPixel(pixel, function(feature, layer) {
 /** forEachFeatureAtPixel
  * Detect features that intersect a pixel on the viewport, 
  * and execute a callback with each intersecting feature. 
  * Layers included in the detection can be configured 
  * through opt_layerFilter. Feature overlays will always 
  * be included in the detection.
  * ビューポート上のピクセルと交差する特徴を検出し、
  * 各交差するフィーチャとコールバックを実行します。
  * 検出に含まれるレイヤが opt_layerFilter を通じて
  * 設定することができます。フィーチャーオーバーレイは
  * 常に検出に含まれます。(ol3 API)
  */
  features.push(feature);
  /** push(elem)
   * Insert the provided element at the end of the 
   * collection.
   * コレクションの最後に供給されたエレメントに挿入します。
   * Name: elem, Type: T, Description: Element
   * (ol3 API)
   */
 });
 if (features.length > 0) {
  var info = [];
  var i, ii;
  for (i = 0, ii = features.length; i < ii; ++i) {
   info.push(features[i].get('name'));
   /** get(key)
    * Gets a value.
    * (ol3 API[説明は Stable Only のチェックを外すと表示])
    */
   /** Array.push
    * 与えられた要素を追加することによって配列を変異させ、
    * (MDN [https://developer.mozilla.org/ja/docs/Web/
    * JavaScript/Reference/Global_Objects/Array/push])
    */
  }
  document.getElementById('info').innerHTML = info.join(', ') || '(unknown)';
  /** Array.join
   * 配列の全ての要素を繋いで文字列にします。
   * (MDN [https://developer.mozilla.org/ja/docs/Web/
   * JavaScript/Reference/Global_Objects/Array/join])
   */
  map.getTarget().style.cursor = 'pointer';
  /** getTarget()
   * Get the target in which this map is rendered. 
   * Note that this returns what is entered as an option or  
   * in setTarget: if that was an element, it returns an 
   * element; if a string, it returns that.
   * レンダリングされたこのマップのターゲットを取得します。
   * これはオプションとして、または setTarget に入力されている
   * ものを返すことに注意してください:それが要素ならば、要素を
   * 返します。文字列ならば、それを返します。(ol3 API)
   */
 } else {
  document.getElementById('info').innerHTML = '&nbsp;';
  map.getTarget().style.cursor = '';
 }
};
$(map.getViewport()).on('mousemove', function(evt) {
/** getViewport()
 * Return: Viewport (ol3 API)
 */
/** jQuery on イベント */
 var pixel = map.getEventPixel(evt.originalEvent);
 /** getEventPixel
  * Returns the map pixel position for a browser event.
  * ブラウザイベントに対して、マップのピクセル位置を返します。
  * (ol3 API)
  */
 displayFeatureInfo(pixel);
});
map.on('click', function(evt) {
/** on
 * Listen for a certain type of event.
 * あるタイプのイベントをリッスンします。(ol3 API)
 */
 displayFeatureInfo(evt.pixel);
});
var exportKMLElement = document.getElementById('export-kml');
if ('download' in exportKMLElement) {
 var vectorSource = /** @type {ol.source.Vector} */ (vector.getSource());
 /** @type 
  * 値のタイプ(型)の説明 - 式などで表示
  * ol.source.Vector の型を使用。
  * (@use JSDoc[http://usejsdoc.org/]より)
  */
 /** getSource()
  * Return: Source(ol3 API)
  */
 exportKMLElement.addEventListener('click', function(e) {
 /** EventTarget.addEventListener
  * addEventListener は、 1 つのイベントターゲットにイベント 
  * リスナーを1 つ登録します。イベントターゲットは、ドキュメント
  * 上の単一のノード、ドキュメント自身、ウィンドウ、あるいは、
  * XMLHttpRequest です。
  * (MDN[https://developer.mozilla.org/ja/docs/Web/API/
  * EventTarget.addEventListener])
  */
  if (!exportKMLElement.href) {
   var features = [];
   vectorSource.forEachFeature(function(feature) {
   /** forEachFeature(callback, opt_this)
    * Iterate through all features on the source, calling 
    * the provided callback with each one. If the callback 
    * returns any "truthy" value, iteration will stop and 
    * the function will return the same value.
    * 提供されたコールバックを呼び出して、ソース上のすべてのフィー
    * チャを反復処理します。コールバックは「truthy」の値を返した
    * 場合、反復が停止し、関数は同じ値を返します。(ol3 API)
    */
    var clone = feature.clone();
    /** clone()
    * Clone this feature. If the original feature has a 
    * geometry it is also cloned. The feature id is not 
     * set in the clone.
     * このフィーチャを複製します。元のフィーチャは、ジオメトリ
     * を有する場合にも複製します。フィーチャ ID は、クローンに
     * 設定されていません。(ol3 API)
     */
    clone.setId(feature.getId()); //clone does not set the id
    /** setId()
     * Set a unique id for this feature. The id may be 
     * used to retrieve a feature from a vector source 
     * with the ol.source.Vector#getFeatureById method.
     * このフィーチャの一意のIDを設定します。 id は 
     * ol.source.Vector の getFeatureById メソッドによる
     * ベクタソースからフィーチャを取り出すために使用する
     * ことができます。(ol3 API)
     */
    /** getId()
     * Return: id(ol3 API)
     */
    clone.getGeometry().transform(projection, 'EPSG:4326');
    /** getGeometry()
     *  Returns the Geometry associated with this feature 
     * using the current geometry name property. By default, 
     * this is geometry but it may be changed by calling 
     * setGeometryName.
     * 現在のジオメトリネームプロパティを使用して、この
     * フィーチャに関連したジオメトリを返します。デフォルト
     * では、ジオメトリですが、setGeometryName を呼び出す
     * ことによって変更することができます。(ol3 API)
     */
    /** transform(source, destination)
     * Transform each coordinate of the geometry from one 
     * coordinate reference system to another. The 
     * geometry is modified in place. For example, a line 
     * will be transformed to a line and a circle to a 
     * circle. If you do not want the geometry modified in 
     * place, first clone() it and then use this function 
     * on the clone.
     * ある座標参照系から別のものへジオメトリの各座標を変換。ジオ
     * メトリは、所定の位置に修正されます。例えば、ラインはライン
     * に、円は円に変換されます。ジオメトリを所定の位置に修正した
     * くない場合、最初にそれを clone() し、それからクローンでこ
     * の関数を使用します。(ol3 API)
     */
    features.push(clone);
   });
   var node = new ol.format.KML().writeFeatures(features);
   /** writeFeatures
    * Encode an array of features in the KML format.
    * KML フォーマットのフィーチャの配列をエンコードします。
    * (ol3 API)
    */
   var string = new XMLSerializer().serializeToString(
   /** XMLSerializer()
    * XMLSerializer can be used to convert DOM subtree or 
    * DOM document into text. XMLSerializer is available to 
    * unprivileged scripts.
    * XmlSerializer は、DOM サブツリーや DOM ドキュメントを
    * テキストに変換するために使用することができます。
    * XmlSerializerを権限のないスクリプトで使用できます。
    * (MDN[https://developer.mozilla.org/en-US/docs/
    * XMLSerializer])
    */
    /** @type {Node} */ (node));
    var base64 = exampleNS.strToBase64(string);
    /** 'example-behavior.js' により文字列を Base64 へ
     * エンコードします。
     */
    exportKMLElement.href =
     'data:application/vnd.google-earth.kml+xml;base64,' + base64;
  }
 }, false);
} else {
 var info = document.getElementById('no-download');
 /**
  * display error message
  */
 info.style.display = '';
}

2 - ol3ex 31a - KML example 1

「KML example(kml.html)」を参考に地図を表示してみます。

HTML ファイルの作成
a Eclipse のメニューの「ファイル」->「ファイルを開く」をクリックします。





b 「ファイルを開く」ウィンドウで、「user」->「mapsite」->「ol3proj」->「v3.0.0」->「examples」->「kml.html」をクリックして選択し、「OK」ボタンをクリックします。
同じように「kml.js」を開きます。





c メニューの「ファイル」->「新規」 -> 「ファイル」をクリックします。



d 「ファイル」ウィンドウで「ol3proj」をクリックして選択し、「ファイル名」を「231-ol3ex.html」と入力し、「次へ」ボタンをクリックします。








e 「File Template」ウィンドウで「HTML 5 Template」をクリックして選択し、「OK」ボタンをクリックします。











f 「kml.html」の内容をコピーして「231-ol3ex.html」に貼り付け、修正します。
g 同じように、新規に「231-ol3ex.js」ファイルを作成し、「File Template」ウィンドウで「JavaScript Template」をクリックして選択し、「完了」ボタンをクリックして、「kml.js」の内容をコピーして貼り付け、修正します。「kml-require.js」も「231-ol3ex-require.js」に貼り付けます。


「231-ol3ex.html」
<!doctype html>
<html lang="en">
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<!--
  <link rel="stylesheet" href="../css/ol.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="../resources/layout.css" type="text/css">
  <link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
-->
  <!-- ディレクトリ修正 -->
  <link rel="stylesheet" href="v3.0.0/css/ol.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap.min.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/layout.css" type="text/css">
  <link rel="stylesheet" href="v3.0.0/resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
  <title>KML example</title>
 </head>
 <body>
  <!-- 
  bootstrap.min.css, bootstrap-responsive.min.css で設定されたセレクタを使用。
  -->
  <div class="navbar navbar-inverse navbar-fixed-top">
   <div class="navbar-inner">
    <div class="container">
<!--
     <a class="brand" href="./"><img src="../resources/logo.png"> OpenLayers 3 Examples</a>
-->
      <!-- ディレクトリ修正 -->
     <a class="brand" href="v3.0.0/examples/"><img src="v3.0.0/resources/logo.png"> OpenLayers 3 Examples</a>
    </div>
   </div>
  </div>
  <div class="container-fluid">
   <div class="row-fluid">
    <div class="span12">
     <div id="map" class="map"></div>
     <div id="no-download" class="alert alert-error" style="display: none">
      The "Export KML" functionality requires a browser that supports the
      <a href="http://caniuse.com/#feat=download">link download</a> attribute.
     </div>
     <a id="export-kml" class="btn" download="map.kml"><i class="icon-download"></i>Export KML</a>
    </div>
   </div>
   <div class="row-fluid">
    <div class="span4">
     <h4 id="title">KML example</h4>
     <p id="shortdesc">Example of using the KML source.</p>
<!--
      <p>See the <a href="kml.js" target="_blank">kml.js source</a> to see how this is done.</p>
-->
       <!-- ファイル修正 -->
      <p>See the <a href="231-ol3ex.js" target="_blank">231-ol3ex.js source</a> to see how this is done.</p>
     </div>
     <div id="tags">KML</div>
    </div>
    <div class="span4 offset4">
     <div id="info" class="alert alert-success">
      &nbsp;
     </div>
    </div>
   </div>
  </div>
<!--
  <script src="jquery.min.js" type="text/javascript"></script>
  <script src="../resources/example-behaviour.js" type="text/javascript"></script>
-->
  <!-- ディレクトリ修正
   jQuery Minified版と
   example-behaviour.js(Examples用 JSコード[文字コードなど])
  -->
  <script src="v3.0.0/examples/jquery.min.js" type="text/javascript"></script>
  <script src="v3.0.0/resources/example-behaviour.js" type="text/javascript"></script>
<!--
  <script src="loader.js?id=kml" type="text/javascript"></script>
-->
  <!-- ファイル修正 -->  <!-- ディレクトリ修正 -->
  <script src="loader.js?id=231-ol3ex" type="text/javascript"></script>

 </body>
</html>