wmts
画像出力 (WMTS)
WMTSによる地図配信機能となります。
HTTP request method
POST/GET
ContentType
application/x-www-form-urlencoded
Parameters
*requiredは必須
名前 | 説明 | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
service*required string |
サービス WMTS
固定値
|
||||||||||||||||||||||||||||||||||||||||||
request*required string |
リクエスト GetTile
タイル取得
|
||||||||||||||||||||||||||||||||||||||||||
version*required string |
バージョン 1.0.0
固定値
|
||||||||||||||||||||||||||||||||||||||||||
layer*required string |
マップタイプを指定 ラスター配信用のマップタイプのみ利用可能です |
||||||||||||||||||||||||||||||||||||||||||
style*required string |
Styleの識別子を指定 default
固定値
highres
高画質
|
||||||||||||||||||||||||||||||||||||||||||
format*required string |
Formatを指定 image/png
固定値
|
||||||||||||||||||||||||||||||||||||||||||
tileMatrixSet*required string |
tileMatrixSetの識別子を指定 Z3857_3_21
固定値
|
||||||||||||||||||||||||||||||||||||||||||
tileMatrix*required string |
tileMatrixの識別子を指定 ズームレベルを表します。 指定可能範囲は3~22となります。 |
||||||||||||||||||||||||||||||||||||||||||
tileRow*required integer |
指定するtileMatrix(ズームレベル)におけるタイルの行を指定 指定可能な値の範囲は下記表を参照してください。
|
||||||||||||||||||||||||||||||||||||||||||
tileCol*required integer |
指定するtileMatrix(ズームレベル)におけるタイルの列を指定 指定可能な値の範囲は下記表を参照してください。
|
Responses
エラーについては「エラーメッセージ一覧」を参照してください。
Media type:image/png
string($binary) |
Example
https://[domain]/map/wmts?service=WMTS&request=GetTile&version=1.0.0&layer=********&style=default&format=image%2Fpng&tileMatrixSet=Z3857_3_21&tileMatrix=3&tileRow=5&tileCol=5
string($binary)
サンプルコード
// 指定したzoomlevel,lat,lonの座標が含まれるrow,colを計算
function lat2tile(lat,zoom) {
lat = Math.floor(lat * 10000000) / 10000000.0;
return (Math.floor((1-Math.log(Math.tan(lat*Math.PI/180) + 1/Math.cos(lat*Math.PI/180))/Math.PI)/2 *Math.pow(2,zoom)));
}
function lon2tile(lon,zoom) {
return (Math.floor((lon+180)/360*Math.pow(2,zoom)));
}
var zoomlevel = 17
var lat = 35.658982
var lon = 139.745716
var z = zoomlevel;
var row = lat2tile(lat, z);
var col = lon2tile(lon, z);