2 - ol3.1ex 49a - XYZ Esri EPSG:4326 tileSize 512 example 1
「TileUTFGrid example(tileutfgrid.html)」を参考に地図を表示してみます。
説明に次のようにあります。
This example shows how to read data from a TileUTFGrid layer.
Point to a country to see its name and flag.
Tiles made with TileMill. Hosting on MapBox.com or with open-source TileServer.
この例では、TileUTFGrid レイヤからデータを読み取る方法を示しています。
国をポイントすると、その名前とフラグを表示します。
タイルは、MapBox.com にホスティングサれている TileMill またはオープンソースTileServer で作成されます。
HTML ファイルの作成
a Eclipse のメニューの「ファイル」->「ファイルを開く」をクリックします。

b 「ファイルを開く」ウィンドウで、「user」->「mapsite」->「ol3proj」->「v3.1.1」->「examples」->「tileutfgrid.html」をクリックして選択し、「OK」ボタンをクリックします。
同じように「tileutfgrid.js」を開きます。
c メニューの「ファイル」->「新規」 -> 「ファイル」をクリックします。
d 「ファイル」ウィンドウで「ol3proj」をクリックして選択し、「ファイル名」を「248-ol3ex.html」と入力し、「次へ」ボタンをクリックします。
e 「File Template」ウィンドウで「HTML 5 Template」をクリックして選択し、「OK」ボタンをクリックします。
f 「tileutfgrid.html」の内容をコピーして「248-ol3ex.html」に貼り付け、修正します。
g 同じように、新規に「248-ol3ex.js」ファイルを作成し、「File Template」ウィンドウで「JavaScript Template」をクリックして選択し、「完了」ボタンをクリックして、「tileutfgrid.js」の内容をコピーして貼り付け、修正します。「tileutfgrid-require.js」も「248-ol3ex-require.js」に貼り付けます。
「248-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.1.1/css/ol.css" type="text/css">
<link rel="stylesheet" href="v3.1.1/resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="v3.1.1/resources/layout.css" type="text/css">
<link rel="stylesheet" href="v3.1.1/resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style type="text/css">
#country-name {
color: black;
font-size: 12pt;
font-weight: bold;
text-shadow: white 0.1em 0.1em 0.2em;
}
</style>
<title>TileUTFGrid 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.1.1/examples/"><img src="v3.1.1/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>
</div>
<div class="row-fluid">
<div class="span12">
<h4 id="title">TileUTFGrid example</h4>
<p id="shortdesc">This example shows how to read data from a TileUTFGrid layer.</p>
<p>Point to a country to see its name and flag.</p>
<div id="docs">
<p>Tiles made with <a href="http://tilemill.com/">TileMill</a>.
Hosting on MapBox.com or with open-source <a href="https://github.com/klokantech/tileserver-php/">TileServer</a>.</p>
<!--
See the <a href="tileutfgrid.js" target="_blank">tileutfgrid.js source</a> to see how this is done.</p>
-->
<!-- ファイル修正 -->
See the <a href="248-ol3ex.js" target="_blank">248-ol3ex.js source</a> to see how this is done.</p>
</div>
<div id="tags">utfgrid, tileutfgrid, tilejson</div>
</div>
</div>
</div>
<div style="display: none;">
<!-- Overlay with the country info -->
<div id="country-info">
<div id="country-name"> </div>
<img id="country-flag" src="" />
</div>
</div>
<!--
<script src="../resources/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.1.1/resources/jquery.min.js" type="text/javascript"></script>
<script src="v3.1.1/resources/example-behaviour.js" type="text/javascript"></script>
<!--
<script src="loader.js?id=tileutfgrid" type="text/javascript"></script>
-->
<!-- ファイル修正 --> <!-- ディレクトリ修正 -->
<script src="loader.js?id=248-ol3ex" type="text/javascript"></script>
</body>
</html>