これは何?

mapcache

OpenLayers3 サンプル + cache seed の範囲を確認する

<!doctype html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="https://openlayers.org/en/v4.0.1/css/ol.css" type="text/css">
    <style>
      .map {
        height : 480px;
        width  : 800px;
        border : 1px solid black;
      }
    </style>
    <script src="https://openlayers.org/en/v4.0.1/build/ol.js" type="text/javascript"></script>
    <title>OpenLayers 3 example</title>
  </head>
  <body>
    <div id="map" class="map"></div>
    <div id="zoomlevel"></div>
    <script type="text/javascript">
      var layers = [
      
        new ol.layer.Tile({
          source: new ol.source.TileWMS({
            url : 'http://localhost:10080/cgi-bin/mapserv?map=/opt/maps/raster.map',
            params: {
              'LAYERS' : 'wmap',
            },
            wrapX: true
          })
        }),
        new ol.layer.Tile({
          source: new ol.source.TileWMS({
            url : 'http://localhost:10080/mapcache?',
            params: {
              // these are simply added to http-get parameter
              'LAYERS' : 'test',
              'TRANSPARENT' : 'TRUE'
            },
            wrapX: true
          })
        })        
      ];

      var mousePosition = new ol.control.MousePosition({
          // coordinateFormat: ol.coordinate.createStringXY(2),
          coordinateFormat: ol.coordinate.toStringHDMS,
          projection: 'EPSG:3857',
          undefinedHTML: 'Outside'
      });
 
      var map = new ol.Map({
        target: 'map',
        layers : layers,
        view: new ol.View({
          center: ol.proj.transform([135.0, 35.0], 'EPSG:4326', 'EPSG:3857'),
          zoom: 4
        }),
        controls: ol.control.defaults({
          zoom: true,
          attribution: true,
          attributionOptions: /** @type {ol.control.ScaleLineUnits} */ ({
            collapsible: false
          }),
          rotate: true
        }).extend([
          mousePosition,
          new ol.control.ZoomSlider()
        ])
      });
      map.on("click", function(evt) {
        var zoom = map.getView().getZoom(); 
        var zoomInfo = 'Zoom level = ' + zoom + ", Location = " + evt.coordinate;
        document.getElementById('zoomlevel').innerHTML = zoomInfo;
      });
    </script>
  </body>
</html>

mapcache_seed

Rasterテーブルに格納するときの最適な元画像の分割

高々 30 分キャッシュを温めればでサクサク動くようになるんで、OpenLayers3 のタイルサイズと同じ 256px x 256px でいいんじゃないですか


GIS


添付ファイル: filesakusaku.png 1747件 [詳細] fileextent.png 1652件 [詳細] filecpu.png 1793件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2017-02-26 (日) 19:54:08 (2609d)
Short-URL: https://at-sushi.com:443/pukiwiki/index.php?cmd=s&k=db341e0951
ISBN10
ISBN13
9784061426061