• WebGIS点要素渲染性能测试


    $('#stationQuery').bind('click', function(){
        var drawStyle = $.extend( { },  map.geomap( "option", "drawStyle" ));
        var graphicLayer = $("#graphicLayer");
        var len = 10000;
        var maxX = 107.91953;
        var minX = 106.74598;
        var maxY = 30.168522;
        var minY = 29.14773;
        for(var i=0; i<len; i++)
        {
            var lgtd = Math.random()*(maxX - minX) + minX;
            var lttd = Math.random()*(maxY - minY) + minY;
            //var projectedCoords = $.geo.proj.fromGeodetic( [lgtd, lttd] );
            var projectedCoords = GLtoXY(lgtd, lttd)
            var geo = { "type": "Point", "coordinates": projectedCoords}    
            graphicLayer.geomap( "append", geo, drawStyle, false );
            
        }
        graphicLayer.geomap( "refresh", true );
        /*
        var featureCollection = {'type':'FeatureCollection', 'features':[]};
        var features = featureCollection.features;
        for(var i=0; i<len; i++)
        {
            var lgtd = Math.random()*(maxX - minX) + minX;
            var lttd = Math.random()*(maxY - minY) + minY;
            var projectedCoords = GLtoXY(lgtd, lttd)
            var feature = { "type": "Feature",
              "geometry": {"type": "Point", "coordinates": projectedCoords},
              "properties": {"prop": i}
              };
            features.push(feature);
        }
        var geo = { "type": "Point", "coordinates": projectedCoords}    
        graphicLayer.geomap( "append", featureCollection, drawStyle );
        */
    });
  • 相关阅读:
    多选菜单shell脚本
    获取nginx日志状态码百分比脚本
    Linux内核参数优化
    deploy.sh
    Docker常用命令速查
    Docker架构
    修改Docker默认存储路径
    redis安装与基本使用
    js实现汉字转拼音
    android:Android 6.0+ 权限控制代码封装
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/5871924.html
Copyright © 2020-2023  润新知