美文网首页
geoserver geomesa timeline

geoserver geomesa timeline

作者: hehehehe | 来源:发表于2023-05-30 17:47 被阅读0次

    将 GEOMESA_HBASE_HOME/dist/gs-plugins/geomesa-hbase-gs-plugin_2.11-$VERSION-install.tar.gz解压到geoserver WBE-INF/lib路径下;

    http://localhost:8080/geoserver/ne/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES&LAYERS=ne%3Ahn&exceptions=application%2Fvnd.ogc.se_inimage&CQL_FILTER=dtg%20DURING%202020-04-01T00%3A00%3A00.000Z%2F2020-04-28T00%3A00%3A00.000Z&SRS=EPSG%3A4326&WIDTH=768&HEIGHT=384&BBOX=-270%2C-135%2C270%2C135

    <body>
    <div id="map">
        <div class="tools">
            <span id="year">1</span>
            <input type="range" min="1" max="10" step="1" value="1" oninput="changeFn(this)">
        </div>
    
    </div>
    <script>
        var center = [116, 39], zoom = 6;
    
        var wmsSource = new ol.source.TileWMS({
            url: 'http://localhost:8080/geoserver/ne/wms',
            params: {
                'LAYERS': 'ne:hn',
                'CQL_FILTER':'dtg DURING 2020-01-01T00:00:00.000Z/2020-01-28T00:00:00.000Z'
            }
        })
        var wms = new ol.layer.Tile({
            source: wmsSource
        })
    
        var map = new ol.Map({
            controls: ol.control.defaults({
                attribution: false
            }),
            target: 'map',
            layers: [ wms],
            view: new ol.View({
                minZoom: 0,
                maxZoom: 18,
                center: ol.proj.fromLonLat(center),
                zoom: zoom
            })
        });
    
        function changeFn(obj) {
            let a = obj.value
            let c = `dtg DURING 2020-01-01T00:00:00.000Z/2020-0${a}-28T00:00:00.000Z`
            console.log(c)
    
            wmsSource.updateParams({'CQL_FILTER': c})
            document.getElementById('year').innerText = obj.value
        }
    </script>
    </body>
    </html>
    
    

    相关文章

      网友评论

          本文标题:geoserver geomesa timeline

          本文链接:https://www.haomeiwen.com/subject/exreedtx.html